![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Android
尼雅馨
辣妈程序猿
展开
-
Service的两种启动模式
Service有两种启动模式,startService 和bindService两种模式下的生命周期如下:(借用了Big不吃鱼的https://www.jianshu.com/p/4c798c91a613)一、startService模式通过这种方式调用startService,onCreate只会被调用一次,多次调用startSercie会多次执行onStartCommand()和onStart...原创 2018-06-12 15:48:05 · 7191 阅读 · 0 评论 -
Android studio常用的6种依赖方法
1.Compile compile是对所有的build type以及favlors都会参与编译并且打包到最终的apk文件中。 2.Provided Provided是对所有的build type以及favlors只在编译时使用,类似eclipse中的external-libs,只参与编译,不打包到最终apk。 3.APK 只会打包到apk文件中,而不参与编译,所以不能再代码中直接调用ja...转载 2018-09-05 15:15:11 · 417 阅读 · 0 评论