当我按home button
或button to see what applications are running
时 - 我的应用关闭了。我试图添加onPause()
,onResume()
等,但没有。它发生在重构后的一段时间内。
登入猫:
05-08 05:13:05.613: D/dalvikvm(655): GC_FOR_ALLOC freed 806K, 75% free 5048K/19820K, paused 59ms, total 61ms
05-08 05:13:05.683: E/SoundPool(375): error loading /system/media/audio/ui/Effect_Tick.ogg
05-08 05:13:05.683: W/AudioService(375): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
05-08 05:13:05.683: E/SoundPool(375): error loading /system/media/audio/ui/Effect_Tick.ogg
05-08 05:13:05.683: W/AudioService(375): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
05-08 05:13:05.683: E/SoundPool(375): error loading /system/media/audio/ui/Effect_Tick.ogg
05-08 05:13:05.683: W/AudioService(375): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
05-08 05:13:05.683: E/SoundPool(375): error loading /system/media/audio/ui/Effect_Tick.ogg
05-08 05:13:05.683: W/AudioService(375): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
05-08 05:13:05.683: E/SoundPool(375): error loading /system/media/audio/ui/Effect_Tick.ogg
05-08 05:13:05.683: W/AudioService(375): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
05-08 05:13:05.683: E/SoundPool(375): error loading /system/media/audio/ui/KeypressStandard.ogg
05-08 05:13:05.683: W/AudioService(375): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
05-08 05:13:05.683: E/SoundPool(375): error loading /system/media/audio/ui/KeypressSpacebar.ogg
05-08 05:13:05.683: W/AudioService(375): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
05-08 05:13:05.683: E/SoundPool(375): error loading /system/media/audio/ui/KeypressDelete.ogg
05-08 05:13:05.693: W/AudioService(375): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
05-08 05:13:05.693: E/SoundPool(375): error loading /system/media/audio/ui/KeypressReturn.ogg
05-08 05:13:05.693: W/AudioService(375): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
05-08 05:13:05.693: E/SoundPool(375): error loading /system/media/audio/ui/KeypressInvalid.ogg
05-08 05:13:05.703: W/AudioService(375): Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg
05-08 05:13:05.703: W/AudioService(375): onLoadSoundEffects(), Error -1 while loading samples
05-08 05:13:05.713: I/ActivityManager(375): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.android.launcher/com.android.launcher2.Launcher} from pid 375
05-08 05:13:05.733: D/gralloc(49): Registering a buffer in the process that created it. This may cause memory ordering problems.
05-08 05:13:05.733: E/libEGL(49): called unimplemented OpenGL ES API
05-08 05:13:05.743: E/libEGL(49): called unimplemented OpenGL ES API
05-08 05:13:05.743: E/libEGL(49): called unimplemented OpenGL ES API
05-08 05:13:05.743: E/libEGL(49): called unimplemented OpenGL ES API
05-08 05:13:05.743: E/SurfaceFlinger(49): glCheckFramebufferStatusOES error -2009986491
05-08 05:13:05.743: E/SurfaceFlinger(49): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
05-08 05:13:05.743: E/libEGL(49): called unimplemented OpenGL ES API
05-08 05:13:05.743: E/libEGL(49): called unimplemented OpenGL ES API
05-08 05:13:05.743: W/WindowManager(375): Screenshot failure taking screenshot for (266x425) to layer 21015
05-08 05:13:07.213: I/Choreographer(544): Skipped 88 frames! The application may be doing too much work on its main thread.
答案 0 :(得分:0)
我发现了问题。问题是AndroiManifest.xml中没有指定启动器活动的标签
<activity
android:name="com.test.MainActivity"
android:label="@string/title_activity_main" >
<intent-filter android:label="@string/app_name" >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>