应用程序不在Nexus 7上运行,而是在其他设备上运行

时间:2012-10-04 09:21:06

标签: android

我已经在Android手机和模拟器上运行了很好的应用程序,但是当我在Nexus 7上运行它时会出现错误:

这是我的logcat报告:

java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.aks.mobilereagents/com.aks.mobilereagents.MobileReagentsAc
tivity}: java.lang.NullPointerException at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method) at
java.lang.reflect.Method.invoke(Method.java:507)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:8
67)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method) Caused by:
java.lang.NullPointerException at
com.aks.mobilereagents.MobileReagentsActivity.onCreate(MobileReagentsActivit
y.java:153)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
... 11 more

1 个答案:

答案 0 :(得分:1)

您需要更仔细地阅读您的例外情况。错误几乎肯定在您的代码中(特别是在com.aks.mobilereagents.MobileReagentsActivity.onCreate(MobileReagentsActivit y.java:153)),而不是Nexus 7本身的错误。