-1

2021-08-14 19:43:53.129 8682-8682/com.future.vpn E/AndroidRuntime: FATAL EXCEPTION: main Process: com.future.vpn, PID: 8682 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference at com.future.vpn.Activities.MainActivity.onStart(MainActivity.java:186) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1435) at android.app.Activity.performStart(Activity.java:8024) at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3475) at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221) at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7656) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 2021-08-14 19:43:53.186 8682-8682/com.future.vpn I/Process: Sending signal. PID: 8682 SIG: 9

Samy
  • 1

2 Answers2

0

This is a NullPointerException, you are passing a null value. Place break points on the sections that contain variables/values then run it (using the Debug feature on). This will show you:

  • which value you are getting a null response from. Once achieved, now check:
  • how your code structure is (global and local scopes). This might be an issue as the scope of the variable assignment determines whether your variable has a value or it doesn't.

Start from there, and it would be best you share the code snippet to make it more elaborate.

Jay R
  • 3
  • 1
  • 2
0

In onstart() Method you have a string that is not initialized and you are comparing it with another string that's why you are getting this error. first, initialize string then compare with another string

Saurabh Dhage
  • 1,478
  • 5
  • 17
  • 31