'Google play java.lang.NullPointerException

I have an app with 100 installs done but I have 2 error on java.lang.NullPointerException; the thing is that when that error came in my device or emulator I could solve it, but I want to ask if there are any way to repair that error if you don't know in which part it crashes?

    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


Solution 1:[1]

Your stack trace tells you which line had the null pointer:

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

Your issue is on line 119 of MainActivity.java.

Make sure you look at the code you used when you released the product - it's possible your development branch has changed since you last released your code, which would mess up the line numbers.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Duncan Jones