08-07 09:02:28.359: E/AndroidRuntime(2769): FATAL EXCEPTION: main

08-07 09:02:28.359: E/AndroidRuntime(2769): java.lang.RuntimeException: Unable to instantiate application com.scdhkj.phone.activity.MyApplication: java.lang.NullPointerException

08-07 09:02:28.359: E/AndroidRuntime(2769):  at android.app.LoadedApk.makeApplication(LoadedApk.java:482)

08-07 09:02:28.359: E/AndroidRuntime(2769):  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3970)

08-07 09:02:28.359: E/AndroidRuntime(2769):  at android.app.ActivityThread.access$1300(ActivityThread.java:126)

08-07 09:02:28.359: E/AndroidRuntime(2769):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1188)

08-07 09:02:28.359: E/AndroidRuntime(2769):  at android.os.Handler.dispatchMessage(Handler.java:99)

08-07 09:02:28.359: E/AndroidRuntime(2769):  at android.os.Looper.loop(Looper.java:137)

08-07 09:02:28.359: E/AndroidRuntime(2769):  at android.app.ActivityThread.main(ActivityThread.java:4456)

08-07 09:02:28.359: E/AndroidRuntime(2769):  at java.lang.reflect.Method.invokeNative(Native Method)

08-07 09:02:28.359: E/AndroidRuntime(2769):  at java.lang.reflect.Method.invoke(Method.java:511)

08-07 09:02:28.359: E/AndroidRuntime(2769):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)

08-07 09:02:28.359: E/AndroidRuntime(2769):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)

08-07 09:02:28.359: E/AndroidRuntime(2769):  at dalvik.system.NativeStart.main(Native Method)

08-07 09:02:28.359: E/AndroidRuntime(2769): Caused by: java.lang.NullPointerException

08-07 09:02:28.359: E/AndroidRuntime(2769):  at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:362)

08-07 09:02:28.359: E/AndroidRuntime(2769):  at android.app.LoadedApk.getClassLoader(LoadedApk.java:305)

08-07 09:02:28.359: E/AndroidRuntime(2769):  at android.app.LoadedApk.makeApplication(LoadedApk.java:474)

08-07 09:02:28.359: E/AndroidRuntime(2769):  ... 11 more

我将原来 用的android4.1.2,改成2.3.3后就不报错了

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐