无法启动活动componentinfo java.lang.nullpointerexception?

时间:2012-01-12 18:15:50

标签: java android eclipse android-activity

当我尝试在手机上运行我的应用时,我收到了这些错误。但有人知道为什么我会收到这些错误吗?提前致谢! 以下是可能导致这些错误的logcat错误?:

    01-12 12:35:06.299: D/dalvikvm(12107): GC_EXTERNAL_ALLOC freed 51K, 49% free 2793K/5379K, external 1596K/2108K, paused 42ms
    01-12 12:35:06.342: D/dalvikvm(12107): GC_EXTERNAL_ALLOC freed 1K, 49% free 2792K/5379K, external 2115K/2641K, paused 33ms
    01-12 12:35:09.792: D/dalvikvm(12107): GC_EXTERNAL_ALLOC freed 10K, 48% free 2826K/5379K, external 2449K/2722K, paused 37ms
    01-12 12:38:46.940: W/KeyCharacterMap(12107): Can't open keycharmap file
    01-12 12:38:46.944: W/KeyCharacterMap(12107): Error loading keycharmap file '/system/usr/keychars/cypress-touchkey.kcm.bin'. hw.keyboards.65537.devname='cypress-touchkey'
    01-12 12:38:46.944: W/KeyCharacterMap(12107): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
    01-12 12:38:58.823: D/dalvikvm(12206): GC_EXTERNAL_ALLOC freed 48K, 49% free 2793K/5379K, external 1596K/2108K, paused 67ms
    01-12 12:38:58.866: D/dalvikvm(12206): GC_EXTERNAL_ALLOC freed 1K, 49% free 2792K/5379K, external 2115K/2641K, paused 32ms
    01-12 12:39:00.679: D/AndroidRuntime(12206): Shutting down VM
    01-12 12:39:00.679: W/dalvikvm(12206): threadid=1: thread exiting with uncaught exception (group=0x40015578)
    01-12 12:39:00.706: E/AndroidRuntime(12206): FATAL EXCEPTION: main
    01-12 12:39:00.706: E/AndroidRuntime(12206): android.content.ActivityNotFoundException: Unable to find explicit activity class {android.app/android.app.activity3}; have you declared this activity in your AndroidManifest.xml?

1 个答案:

答案 0 :(得分:5)

01-12 12:39:00.706: E/AndroidRuntime(12206): android.content.ActivityNotFoundException: Unable to find explicit activity class {android.app/android.app.activity3}; have you declared this activity in your AndroidManifest.xml?

您是否在Activity ??

中声明了名为activity3的{​​{1}}