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

评论

  • AlenaGergo回复

    cialis for sale in usa.

    http://buycialiskj.com/ - generic cialis online

    <a href="http://buycialiskj.com/">buy cialis</a>

    cialis 5mgcenik

  • universalsitesupplies.co.uk回复

    Heya i am for the first time here. I found this board and I find It really helpful & it helped me out a lot. I'm hoping to provide one thing back and help others such as you helped me.

  • Adidas NMD Women Mesh Surface Black Sky Blue回复

    My wife and i got really fortunate Emmanuel managed to round up his researching out of the ideas he obtained out of the site. It is now and again perplexing to simply find yourself giving for free thoughts that many the others might have been trying to sell. And we keep in mind we've got the website owner to be grateful to for this. The illustrations you have made, the simple website navigation, the relationships you will make it possible to instill - it's got everything exceptional, and it is making our son in addition to the family know that this subject matter is pleasurable, and that is unbelievably pressing. Many thanks for all the pieces!

  • dog training回复

    I have observed that charges for internet degree gurus tend to be an excellent value. Like a full 4-year college Degree in Communication in the University of Phoenix Online consists of Sixty credits at $515/credit or $30,900. Also American Intercontinental University Online comes with a Bachelors of Business Administration with a total program feature of 180 units and a worth of $30,560. Online learning has made taking your higher education degree been so cool because you can certainly earn your current degree through the comfort of your house and when you finish working. Thanks for all your other tips I've learned through your web site.

  • Computer Design回复

    Great post. I was checking constantly this blog and I am impressed! Extremely useful info particularly the last part 😊 I care for such info much. I was seeking this certain information for a long time. Thank you and best of luck.

  • yeezy回复

    Thanks so much for providing individuals with an exceptionally splendid possiblity to read critical reviews from this website. It really is so superb plus jam-packed with fun for me personally and my office peers to search your website the equivalent of thrice every week to learn the newest things you have. And indeed, we're at all times impressed with all the unbelievable points you serve. Certain 1 facts in this post are unquestionably the simplest I've had.

  • yeezy boost 350回复

    This web site can be a stroll-by for the entire data you wished about this and didn抰 know who to ask. Glimpse here, and you抣l positively uncover it.

  • SPAM回复

    Thank you for sharing excellent informations. Your site is so cool. I'm impressed by the details that you’ve on this website. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for extra articles. You, my friend, ROCK! I found just the info I already searched everywhere and just couldn't come across. What a perfect website.

  • Technology News回复

    I've recently started a site, the information you provide on this web site has helped me tremendously. Thanks for all of your time & work. "The inner fire is the most important thing mankind possesses." by Edith Sodergran.

  • justbedding.com.au回复

    Hello, you used to write fantastic, but the last several posts have been kinda boring¡K I miss your super writings. Past few posts are just a bit out of track! come on!

  • Sito Truffa回复

    An added important component is that if you are an elderly person, travel insurance intended for pensioners is something you ought to really contemplate. The mature you are, the greater at risk you are for permitting something bad happen to you while in most foreign countries. If you are definitely not covered by a number of comprehensive insurance policy, you could have many serious challenges. Thanks for expressing your good tips on this website.

  • linux.net回复

    Mommy and Daddү hugged tһe twins becɑuse iit was getting time to
    get to bed. ?Mommy thinks the moѕt effeсtive thing about
    God is һe gɑvee me these two little rascals ɑnd theyre one of the best thing in Mommy?s world.?
    She mentioned cuddling and tickling each boys. Thaat was the type of thing mommies all the time say.

    The gigggleⅾ and hugged Mommy and have been nearly able tо go toо their bunk
    Ьeds when Lee said.

  • porn movies回复

    I believe that avoiding prepared foods could be the first step to help lose weight. They might taste great, but refined foods have very little vitamins and minerals, making you feed on more just to have enough power to get through the day. If you are constantly having these foods, changing to grain and other complex carbohydrates will make you to have more vigor while consuming less. Interesting blog post.

  • chennai news today回复

    here are some links to internet sites that we link to since we believe they're really worth visiting

  • Antalya Escort回复

    I am in fact grateful to the holder of this website who has shared this wonderful piece of writing at at this place.