Android项目从零到上线的全过程

  • 2017-05-21
  • 1
  • 922

写在最前面

个人开发者的开发Android的热潮已过,目前实在不太适合个人开发者的生存。但是没事的时候运用新技术写点小软件,开源出来跟大家一起学习,一起营造一个好的开发环境。

关于作者

软件立项及方向选择

因为自己的一个想法开始做这个项目,或者在实际开发中由产品经理立项。由于本人不会后端,所以选择的是三方开源API。
百度apistore——里面有很多可以用的API接口,有付费的也有免费的。
你也可以直接用Bmob后端云——一个强劲的后端,免去所有服务器端编码工作量

本软件包含两大模块
- 美拍视频 Api 取自 美拍Api

美拍视频

2.jpg

原型设计

墨刀——免费的移动应用原型与线框图工具
人人都是产品经理——产品经理、产品爱好者学习交流平台

UI设计

UI设计大家都知道PS或者coreldraw,当然作者只会切图。本项目全部运用Android material design设计风格
官方Material Design详细介绍文档:http://www.google.com/design/spec/material-design/introduction.html

框架的搭建

现在的MVP模式越来越流行。所以框架主体选用了MVP+RxJava+Retrofit+okhttp3
具体可查看:一个优秀的Android应用从建项目开始

开发

这个阶段是最简单的,详细怎么开发作者就不阐述了。在这里作者给出本项目所用到的东西:
- CoordinatorLayout——使用CoordinatorLayout打造各种炫酷的效果
- 【Android】Fragment懒加载和ViewPager的坑——Fragment懒加载
- Android开发人员不得不收集的代码(持续更新中)——Android工具类
- EasyRecyclerView——支持下拉上拉刷新等功能全面的RecyclerView
- 2016Android开源项目及库汇总——开源项目及库汇总

上线准备

1、各平台账号的申请

  • 应用市场
    对于个人开发者来说,Android App开发最麻烦的不是开发,而是各种应用商店的审核,广告平台的集成以及推广。由于只有一个人,所以必须所有的事情都自己做。而且对于个人来说,即便上述操作都完成了,如果应用商店不进行推荐,下载量也是迟迟起不来。毕竟不论软件好用与否,大家下载软件往往都是从下载量高到下载量低的。我的某些软件也是因为当初有应用商店与广告平台合作,会对特定广告平台的软件进行推广,而下载量暴增的。由于国家的实名制规定,很多的应用商店开始审核身份证了,需要身份证扫描件,照片等等,这个给个人开发者带来了很大的困扰。
  • 登录及分享平台账号
    分享和登录可单独集成,也可以使用sharesdk、友盟等三方工具。分享还好,但是微信登录必须要进行认证,而且要收取年费,对于个人开发者又是一大困扰。
  • 统计
    统计现在一般都是用友盟,没什么可说的了

2、官网以及运营

对于个人开发者而言,官网和运营肯定是越简单越好,除非你这个项目有很好的商业模式。所以一般就自己进行一个简单的新媒体运营,这里为大家推荐这篇文章:新媒体运营微信编辑人员必备工具(打包免费送)
作者一般用的是:MAKA——一分钟上手,五分钟创作H5,超越PPT的极简操作方式!单页可以用来做官网。

3、代码混淆

为什么需要代码混淆呢?原因很简单,你的apk很容易被反编译出来,你写的代码都会被看到,因此我们需要在编译过程中对代码进行一定程度的混淆,使得别人不能反编译不出你的代码。本文因为是开源,所以没做混淆处理。下面介绍下具体混淆过程:
新建一个项目,Android Studio默认关闭代码混淆开关,在build.gradle文件中,如下图所示的minifyEnabled 开关,因此如果需要混淆代码,需将false改为true,然后在文件proguard-rules.pro添加具体混淆规则。

-dontskipnonpubliclibraryclasses # 不忽略非公共的库类
-optimizationpasses 5 # 指定代码的压缩级别
-dontusemixedcaseclassnames # 是否使用大小写混合
-dontpreverify # 混淆时是否做预校验
-verbose # 混淆时是否记录日志
-keepattributes *Annotation* # 保持注解
-ignorewarning # 忽略警告
-dontoptimize # 优化不优化输入的类文件

-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* # 混淆时所采用的算法

#保持哪些类不被混淆
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService

#生成日志数据,gradle build时在本项目根目录输出
-dump class_files.txt #apk包内所有class的内部结构
-printseeds seeds.txt #未混淆的类和成员
-printusage unused.txt #打印未被使用的代码
-printmapping mapping.txt #混淆前后的映射

-keep public class * extends android.support.** #如果有引用v4或者v7包,需添加
-libraryjars libs/xxx.jar #混淆第三方jar包,其中xxx为jar包名
-keep class com.xxx.**{*;} #不混淆某个包内的所有文件
-dontwarn com.xxx** #忽略某个包的警告
-keepattributes Signature #不混淆泛型
-keepnames class * implements java.io.Serializable #不混淆Serializable

-keepclassmembers class **.R$* { #不混淆资源类
public static <fields>;
}
-keepclasseswithmembernames class * { # 保持 native 方法不被混淆
native <methods>;
}
-keepclasseswithmembers class * { # 保持自定义控件类不被混淆
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * { # 保持自定义控件类不被混淆
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers class * extends android.app.Activity { # 保持自定义控件类不被混淆
public void *(android.view.View);
}
-keepclassmembers enum * { # 保持枚举 enum 类不被混淆
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable { # 保持 Parcelable 不被混淆
public static final android.os.Parcelable$Creator *;
}

3、打包上传市场

这阶段主要注意的就是各个平台的审核标准,说实话对于个人开发者,各个平台都不是很友好,很多限制。这个就需要自己慢慢琢磨了。

写到最后

以上经供参考,有不对的地方提出来大家一起探讨。
APK下载地址:http://pan.baidu.com/s/1pLKZq0z
最后给出github地址,给个star支持下作者。谢谢!
https://github.com/Rance935/BeautyPaPa

本文作者:Rance935本文出处:Android项目从零到上线的全过程转载请在开头注明作者详细信息和本文出处
欢迎关注我的微信公众号和QQ群,分享Android 开发和互联网内容
Android技术分享:群号534813930
微信号:androidparks
公众号:AndroidParks

评论

  • Health and Fitness回复

    hi!,I love your writing so so much! percentage we be in contact extra approximately your post on AOL? I need a specialist in this house to resolve my problem. May be that's you! Looking forward to see you.

  • buy clopidogrel las vegas回复

    Hello Dear, are you in fact visiting this web site daily,
    if so after that you will absolutely get good knowledge.

  • Health and Fitness回复

    Some truly fantastic articles on this website, appreciate it for contribution. "When he has ceased to hear the many, he may discern the One - the inner sound which kills the outer." by H Hahn Blavatsky.

  • Health and Fitness回复

    I think other web-site proprietors should take this website as an model, very clean and wonderful user friendly style and design, let alone the content. You are an expert in this topic!

  • Best Travel Deals回复

    Very nice post and straight to the point. I am not sure if this is truly the best place to ask but do you people have any thoughts on where to get some professional writers? Thx 😊

  • Health and Fitness回复

    I like the valuable information you provide in your articles. I’ll bookmark your blog and check again here regularly. I am quite sure I will learn lots of new stuff right here! Best of luck for the next!

  • Web Design回复

    Simply a smiling visitant here to share the love (:, btw great style .

  • Health and Fitness回复

    Thank you, I've just been searching for info approximately this subject for a long time and yours is the greatest I have discovered till now. However, what about the bottom line? Are you certain concerning the supply?

  • Health and Fitness回复

    I think other web-site proprietors should take this website as an model, very clean and excellent user genial style and design, let alone the content. You are an expert in this topic!

  • Web Design回复

    of course like your website however you need to check the spelling on quite a few of your posts. A number of them are rife with spelling problems and I in finding it very bothersome to inform the reality then again I'll surely come back again.

  • Health and Fitness回复

    Hi there, I discovered your site by means of Google at the same time as searching for a similar subject, your site came up, it appears great. I have bookmarked it in my google bookmarks.

  • incajungle.com回复

    Many thanks for this article. I'd personally also like to convey that it can end up being hard when you find yourself in school and merely starting out to create a long credit score. There are many college students who are simply trying to survive and have a long or beneficial credit history are often a difficult issue to have.

  • Health and Fitness回复

    I've been browsing online greater than 3 hours lately, yet I never discovered any interesting article like yours. It's pretty value sufficient for me. Personally, if all site owners and bloggers made good content material as you did, the internet will probably be a lot more helpful than ever before. "I think that maybe if women and children were in charge we would get somewhere." by James Grover Thurber.

  • Screen Printed Signs回复

    Thank you for the sensible critique. Me and my neighbor were just preparing to do a little research about this. We got a grab a book from our local library but I think I learned more clear from this post. I am very glad to see such fantastic info being shared freely out there.

  • Web Design回复

    Very interesting info!Perfect just what I was searching for!

  • VutecK Printer in Brooklyn回复

    I'm not sure why but this website is loading incredibly slow for me. Is anyone else having this issue or is it a problem on my end? I'll check back later and see if the problem still exists.

  • Health and Fitness回复

    I have not checked in here for some time as I thought it was getting boring, but the last few posts are great quality so I guess I will add you back to my daily bloglist. You deserve it my friend 😊

  • Health and Fitness回复

    Hello there, You have done an incredible job. I will definitely digg it and personally suggest to my friends. I'm sure they will be benefited from this web site.

  • Health and Fitness回复

    Some truly excellent articles on this web site, appreciate it for contribution. "He that falls in love with himself will have no rivals." by Benjamin Franklin.

  • Home Improvement回复

    Enjoyed examining this, very good stuff, thanks . "A man does not die of love or his liver or even of old age he dies of being a man." by Percival Arland Ussher.

  • Comsa ICO回复

    I have observed that in the world the present day, video games will be the latest popularity with kids of all ages. Occasionally it may be not possible to drag your kids away from the games. If you want the best of both worlds, there are many educational video games for kids. Interesting post.

  • pro回复

    Thanks for some other informative blog. Where else may I get that kind of info written in such a perfect means? I've a venture that I'm simply now working on, and I've been on the glance out for such information.

  • Health and Fitness回复

    I'll immediately grasp your rss as I can not in finding your email subscription link or newsletter service. Do you have any? Kindly allow me recognize so that I could subscribe. Thanks.

  • Business回复

    I have been absent for a while, but now I remember why I used to love this site. Thank you, I will try and check back more often. How frequently you update your web site?

  • Health and Fitness回复

    I truly enjoy reading on this web site, it contains wonderful posts. "Never fight an inanimate object." by P. J. O'Rourke.

  • Health and Fitness回复

    Wow, superb blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your web site is fantastic, let alone the content!

  • Health and Fitness回复

    I really wanted to construct a brief message so as to say thanks to you for some of the amazing facts you are placing here. My rather long internet research has at the end of the day been compensated with beneficial facts to talk about with my pals. I would assert that we site visitors are extremely fortunate to dwell in a superb community with so many wonderful people with good points. I feel pretty happy to have seen the website page and look forward to plenty of more awesome times reading here. Thanks a lot again for a lot of things.

  • Health and Fitness回复

    I really enjoy reading on this website , it has got great blog posts. "Sometime they'll give a war and nobody will come." by Carl Sandburg.

  • Health and Fitness回复

    You made some decent points there. I did a search on the subject matter and found most individuals will go along with with your blog.

  • Home Improvement回复

    Absolutely composed content material , appreciate it for selective information .

  • Health and Fitness回复

    You really make it seem really easy along with your presentation however I to find this matter to be actually something that I believe I'd never understand. It seems too complicated and extremely vast for me. I'm having a look forward in your next submit, I will attempt to get the dangle of it!

  • Health and Fitness回复

    Only wanna input that you have a very decent website , I enjoy the pattern it really stands out.

  • Health and Fitness回复

    Thank you, I have recently been looking for info about this topic for ages and yours is the greatest I have found out so far. However, what about the bottom line? Are you sure about the source?

  • Health and Fitness回复

    Unquestionably believe that which you said. Your favorite reason seemed to be on the net the easiest thing to be aware of. I say to you, I definitely get annoyed while people consider worries that they just don't know about. You managed to hit the nail upon the top and also defined out the whole thing without having side-effects , people could take a signal. Will probably be back to get more. Thanks

  • Health and Fitness回复

    Unquestionably believe that which you stated. Your favorite reason appeared to be on the web the easiest thing to be aware of. I say to you, I definitely get irked while people think about worries that they just do not know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side-effects , people can take a signal. Will probably be back to get more. Thanks

  • Education回复

    I believe you have noted some very interesting points , regards for the post.

  • Money Control回复

    This is really interesting, You are a very skilled blogger. I have joined your feed and look forward to seeking more of your fantastic post. Also, I have shared your site in my social networks!

  • mexican回复

    Hi, I check your blog like every week. Your humoristic style is awesome,
    keep it up!

  • stainless steel hanging drying rack回复

    Definitely believe that which you said. Your favorite justification seemed to be on the net the simplest thing to be aware of. I say to you, I certainly get irked while people consider worries that they just don't know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side-effects , people could take a signal. Will probably be back to get more. Thanks

  • Health and Fitness回复

    I’m not sure where you are getting your info, but great topic. I needs to spend some time learning much more or understanding more. Thanks for magnificent information I was looking for this info for my mission.

  • Health and Fitness回复

    I conceive you have observed some very interesting details , regards for the post.