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

写在最前面

个人开发者的开发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

评论

  • Digital Altitude回复

    Thanks for sharing your thoughts. I really appreciate your efforts and
    I will be waiting for your next post thanks once
    again.

  • parnell rosenberg irwin回复

    Woah! I'm really enjoying the template/theme
    of this blog. It's simple, yet effective. A lot
    of times it's challenging to get that "perfect balance" between superb usability and visual appeal.
    I must say you have done a great job with this.
    In addition, the blog loads extremely quick for me on Internet explorer.
    Exceptional Blog!

  • Men Dating (Men Dating)回复

    Hi! Do you use Twitter? I'd like to follow you if that would be ok.
    I'm absolutely enjoying your blog and look forward to new posts.

  • neuracel pills scam回复

    They are not detailed about how Quantum Code software works, because
    they do not have any

  • Meet and Greet回复

    We absolutely love your blog and find nearly all of your post's to be exactly I'm looking for.
    can you offer guest writers to write content in your case?
    I wouldn't mind publishing a post or elaborating on some of the
    subjects you write regarding here. Again, awesome blog!

  • Tangkascom回复

    Hi there Dear, are you in fact visiting this web site regularly, if so after that you will definitely get pleasant know-how.

  • Elsa回复

    There are surely some more details to take into account,
    yet thank you for sharing this info.

  • carme tarot futbol回复

    blog tarot de maria carme tarot futbol los arcanos tarot
    si no tirada celta tarot marsella tarot personalizado
    2016 magia del tarot la luna tarot para cancer dia hoy consultacartas tarot del amor lectura delas cartas del tarot gratis aol
    tarot arthur edward waite pdf reina de copas tarot marsella carta tarot la fuerza en el
    amor tirada de cartas gratis si o no tarot trabajo alicia galvan flor
    tarot geminis mayo 2015 tirada de tarot gitano el oraculo lectura del tarot en caguas
    puerto rico libro yo el tarot jodorowsky la carta del dia tarot gitano horoscopo
    tarot de hoy videos arcano 3 tarot significado tarot rider tirada del
    amor tarot celta 10 cartas el tarot gratis mas acertado lectura tarot 3 cartas
    tarot gratis al instante osho zen tarot la rueda tarot
    rider tarot girona voluntad tarot egipcio+tirada gratis on line tarot futuro economico tirada de tarot gratis para acuario 2015 significado
    del tarot rider las cartas del tarot y su significado tienda de tarot mexico df tarot gratis para acuario 2015
    videncia tarot en linea gratis significado das cartas tarot rider waite tarot virgo hoy cartas de
    tarot gitano significado rueda de la fortuna tarot preguntas tarot gratis si
    o no busco tarotista barcelona reina bastos tarot amor tarot gratis de marsella univision tarot sobre
    trabajo tarot del futuro inmediato gratis tarot gratis tuvida cartas del tarot de marsella para imprimir pdf tarot oraculo

  • Swinszfu回复

    昨日は、気分的に何となく、ウエッジの52度と56度を、普段使っているタイトリストから、テーラーメードのものに代えて持っていきました。 御幣を承知で言えば飛んで曲がらないスイングはないのです。 [url=http://futava.com/ping/g30_1/index.html]ピン g30[/url]
     その後、黒人らによる講義デモが勃発し、ダラスで1人の   黒人が11人の警官と2人の市民に銃を乱射し5人の警官を殺害   するなど彼らは暴力的になりました。 FWウッドのスプーンも定価税込54000円が32400円と此方も送料無料考えれば31400円で買った事に成り、約42%とスキー板の割引30%と比べればやはりゴルフクラブは値引率が高いと感じる。
    [url=http://cattowngame.com/mb/718_1/index.html]タイトリスト ap2 アイアン 評価[/url] 内祝のサブレを焼き上げ、明後日のキッズ教室に向けて、今日は抹茶を加えた星形サブレを大小合わせて、100枚ほど。 経年でパネルを接着している接着剤が黄色く変色し始めているのだが、中国製のためかかなりはみ出しが目立つ。
    [url=http://futava.com/ping/g30_1/index.html]ピン g30[/url]
    レジ袋は多少、ゴミ用に必要なので、エコバックをレジで出すか出さないか・・家にどの位、レジ袋の在庫が有るか・・ちょっと考えてから出す(笑)レジ袋を廃止するお店がどんどん多くなって行くので、これは困る・・レジ袋にお金のかかるお店には行かなくなった。 分売発表で値を下げた3140イデアですが、分割や優待が控えているので、100株だけ分売に応募したいと思います。 [url=http://abqpoly.com/xxio9/iron_1/index.html]xxio9 アイアン 価格[/url]
    「ぼくのニューヨーク案内」  生粋のニューヨーカーにも劣らぬ旺盛な好奇心と該博な知識で語りかけるこの不思議な都会の魅力。 此からは練習場でもGⅢを使って、しっかり芯捉える様に練習したい!芯を外すと飛ばない高反発クラブで練習すれば、益々M2の飛距離も伸びる筈で、コースでは当分M2を使うつもりだ! まだまだゴルフも止められない!。
    [url=http://abqpoly.com/xxio9/iron_1/index.html]ゼクシオ レディース 価格[/url] ◆20161122 E257系-M103+M?編成(特急あずさ13号:63M) 甲斐大和~勝沼ぶどう郷間  ブルサン貨物(83レ)の後スジで登場したのは211系の537レ。 ラケットのリピーターがいないと、売れないのでしょう。
    [url=http://jan.hise.org/mizuno/jpx900_1/index.html]ミズノ JPX900 アイアン[/url]

  • free instagram followers bot回复

    It is truly a nice and helpful piece of information. I am glad that you
    shared this helpful info with us. Please stay us up to date
    like this. Thanks for sharing.

  • Control units回复

    Great work! This is the kind of information that should be shared around the web.

    Shame on the seek engines for not positioning this publish higher!
    Come on over and visit my web site . Thank you =)

  • Clay Matthews Jerseys回复

    I'm still learning from you, as I'm trying to achieve my goals.
    I absolutely love reading everything that is posted on your website.Keep the stories coming.
    I loved it!

  • betway888.co回复

    I'm really loving the theme/design of your site. Do you ever run into any web browser compatibility problems?
    A handful of my blog readers have complained about my site
    not operating correctly in Explorer but looks great in Opera.
    Do you have any solutions to help fix this problem?

  • domperidone online shopping money order回复

    I'm amazed, I have to admit. Rarely do I encounter a blog that's both equally educative
    and engaging, and without a doubt, you have hit the nail on the head.
    The problem is something not enough men and women are speaking intelligently about.
    I am very happy that I came across this in my hunt for something regarding this.

  • Mellisa回复

    Pretty section of content. I just stumbled upon your web site
    and in accession capital to assert that I get in fact enjoyed account your blog posts.
    Anyway I'll be subscribing to your augment and even I achievement you access consistently fast.

  • 대전풀싸롱回复

    Hi there it's me, I am also visiting this website regularly, this
    site is actually pleasant and the people are in fact sharing nice thoughts.

  • equipment online回复

    whoah this blog is wonderful i like reading your articles.

    Keep up the good work! You realize, lots of persons are looking round for this info, you can aid them greatly.

  • site回复

    You can definitely see your expertise in the article you write.
    The sector hopes for more passionate writers such as you who aren't afraid
    to mention how they believe. At all times follow your heart.

  • price epivir pct回复

    Hey there! I know this is kind of off topic but I was wondering which blog platform are you using for this site?

    I'm getting fed up of WordPress because I've had problems
    with hackers and I'm looking at options for another platform.
    I would be great if you could point me in the direction of a good platform.

  • www.meritec.su回复

    Fastidious replies in return of this question with real arguments and explaining everything about that.

  • Shanghai Qianyi Communication & Equipment回复

    Hello there I am so delighted I found your website, I really found you by mistake, while I was looking on Aol for
    something else, Regardless I am here now and would just like to say
    kudos for a marvelous post and a all round thrilling blog (I also love the theme/design),
    I don’t have time to read it all at the minute but I have saved
    it and also added your RSS feeds, so when I have time I will be back to read more, Please do keep up the great work.