Android应用无法在设备上启动

时间:2014-11-30 12:06:10

标签: android android-intent android-activity nullpointerexception google-cloud-messaging

我正在Android中开发一个应用程序并且没有语法错误但是当我在我的设备上部署我的应用程序时它会给出以下logcat错误,请帮助我,如果有人可以进行我的colg项目

以下是logcat错误

            12-01 01:52:10.310: E/Trace(7853): error opening trace file: No such file or directory (2)
            12-01 01:52:10.310: D/ActivityThread(7853): setTargetHeapUtilization:0.75
            12-01 01:52:10.310: D/ActivityThread(7853): setTargetHeapIdealFree:8388608
            12-01 01:52:10.310: D/ActivityThread(7853): setTargetHeapConcurrentStart:2097152
            12-01 01:52:10.380: W/dalvikvm(7853): Refusing to reopen boot DEX '/system/framework/hwframework.jar'
            12-01 01:52:10.660: I/ActivityThread(7853): Pub com.aiou.fyp.provider: com.aiou.fyp.DataProvider
            12-01 01:52:11.070: W/dalvikvm(7853): threadid=1: thread exiting with uncaught exception (group=0x42022438)
            12-01 01:52:11.090: E/AndroidRuntime(7853): FATAL EXCEPTION: main
            12-01 01:52:11.090: E/AndroidRuntime(7853): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.aiou.fyp/com.aiou.fyp.MainActivity}: java.lang.NullPointerException
            12-01 01:52:11.090: E/AndroidRuntime(7853):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2077)
            12-01 01:52:11.090: E/AndroidRuntime(7853):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2102)
            12-01 01:52:11.090: E/AndroidRuntime(7853):     at android.app.ActivityThread.access$600(ActivityThread.java:137)
            12-01 01:52:11.090: E/AndroidRuntime(7853):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
            12-01 01:52:11.090: E/AndroidRuntime(7853):     at android.os.Handler.dispatchMessage(Handler.java:99)
            12-01 01:52:11.090: E/AndroidRuntime(7853):     at android.os.Looper.loop(Looper.java:137)
            12-01 01:52:11.090: E/AndroidRuntime(7853):     at android.app.ActivityThread.main(ActivityThread.java:4838)
            12-01 01:52:11.090: E/AndroidRuntime(7853):     at java.lang.reflect.Method.invokeNative(Native Method)
            12-01 01:52:11.090: E/AndroidRuntime(7853):     at java.lang.reflect.Method.invoke(Method.java:511)
            12-01 01:52:11.090: E/AndroidRuntime(7853):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:874)
            12-01 01:52:11.090: E/AndroidRuntime(7853):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641)
            12-01 01:52:11.090: E/AndroidRuntime(7853):     at dalvik.system.NativeStart.main(Native Method)
            12-01 01:52:11.090: E/AndroidRuntime(7853): Caused by: java.lang.NullPointerException
            12-01 01:52:11.090: E/AndroidRuntime(7853):     at com.aiou.fyp.MainActivity.onCreate(MainActivity.java:53)
            12-01 01:52:11.090: E/AndroidRuntime(7853):     at android.app.Activity.performCreate(Activity.java:5010)
            12-01 01:52:11.090: E/AndroidRuntime(7853):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
            12-01 01:52:11.090: E/AndroidRuntime(7853):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2041)
            12-01 01:52:11.090: E/AndroidRuntime(7853):     ... 11 more

1 个答案:

答案 0 :(得分:1)

这通常发生在你忘记给某个布局组件充气但你正试图在课堂上使用它时。