Google播放java.lang.NullPointerException

时间:2013-05-03 13:08:58

标签: java android google-play

我有一个100安装dones的应用程序,但我在java.lang.NullPointerException有2个错误,事情是,当我的设备或模拟器中的错误来我可以解决它,但我想问是否有任何修复错误的方法,如果你不知道它崩溃的部分?

    java.lang.RuntimeException: Unable to start activityComponentInfo{espanolasguapas/espanolasguapas.MainActivity}:
    java.lang.NullPointerException
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1750)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1766)
    at android.app.ActivityThread.access$1500(ActivityThread.java:125)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:955)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:130)
    at android.app.ActivityThread.main(ActivityThread.java:3821)
    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:875)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:633)
    at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.lang.NullPointerException
    at espanolasguapas.MainActivity.onCreate(MainActivity.java:119)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1714)
    ... 11 more

1 个答案:

答案 0 :(得分:1)

您的堆栈跟踪告诉您哪一行有空指针:

Caused by: java.lang.NullPointerException
  at sxa.sexolia.espanolasguapas.MainActivity.onCreate(MainActivity.java:119)

您的问题出在MainActivity.java第119行

确保查看发布产品时使用的代码 - 自上次发布代码以来,您的开发分支可能已更改,这会使行号变得混乱。