Android的官方文档是这样建议的:

对于Activity:
Note: Your implementation of these lifecycle methods must always call the superclass implementation before doing any work, as shown in the examples above.
即首先调用super.detory()


对于App Service:
Unlike the activity lifecycle callback methods, you are not required to call the superclass implementation of these callback methods. 不是强制需要调用,因为在父类service中,是个空实现。


注意:pmd对于android的检查结果是错误的。

更多相关文章

  1. java.lang.ClassCastException: android.app.Application cannot
  2. Android开发中Android与网页(JavaScrip)t的交互
  3. Android(安卓)手机震动 设置震动时间
  4. Android中获得上下文的静态方法
  5. Android开发错误——Android(安卓)Studio中遇到过的错误问题与解
  6. Android中利用DisplayMetrics取得手机屏幕大小
  7. 2011.11.22——— android jni简单用法
  8. Android(安卓)ListView简单实用
  9. 2011.11.22——— android jni简单用法

随机推荐

  1. Android创建和使用数据库
  2. Android(安卓)中LayoutInflater(布局加载
  3. Android(安卓)数字签名学习笔记
  4. Android(安卓)开发之旅:又见Hello World!
  5. Android开发者应该深入学习的10个开源应
  6. Android(安卓)实现颜色渐变的一个小 tip
  7. Android混合开发(二)——JSBridge传值注意
  8. 转: [Android]获取未安装的APK信息
  9. android 自适应 多屏幕支持 .
  10. Android(安卓)之 使用MediaPlayer播放音