java.lang.RuntimeException

Unable to start activity ComponentInfo{sg.gov.mfa/sg.gov.mfa.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference

Samebug tips1

Try loading the text file into a WebView, then printing the contents of the WebView.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Stack trace

  • java.lang.RuntimeException: Unable to start activity ComponentInfo{sg.gov.mfa/sg.gov.mfa.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) at android.app.ActivityThread.access$900(ActivityThread.java:150) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

filipebatistafilipebatista
9 times, last one
SacchiSacchi
37 times, last one
Hiren AmaliyarHiren Amaliyar
2 times, last one
Indri YunitaIndri Yunita
252 times, last one
AravindAravind
9 times, last one
207 more bugmates