java.lang.RuntimeException: Unable to start activity ComponentInfo{com..MainActivity}:
java.lang.NullPointerException:
Attempt to invoke virtual method 'boolean org.json.JSONObject.getBoolean(java.lang.String)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2756)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2825)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1557)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6343)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1084)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:945)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean org.json.JSONObject.getBoolean(java.lang.String)' on a null object reference
at io.branch.rnbranch.RNBranchModule$1.onInitFinished(RNBranchModule.java:110)
at io.branch.referral.Branch.initializeSession(Branch.java:2263)
at io.branch.referral.Branch.initUserSessionInternal(Branch.java:1255)
at io.branch.referral.Branch.initSession(Branch.java:917)
at io.branch.referral.Branch.initSession(Branch.java:991)
at io.branch.rnbranch.RNBranchModule.initSession(RNBranchModule.java:96)
at com.nextbillion.groww.MainActivity.onStart(MainActivity.java:33)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1270)
at android.app.Activity.performStart(Activity.java:6706)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2719)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2825)聽
at android.app.ActivityThread.-wrap12(ActivityThread.java)聽
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1557)聽
at android.os.Handler.dispatchMessage(Handler.java:110)聽
at android.os.Looper.loop(Looper.java:203)聽
at android.app.ActivityThread.main(ActivityThread.java:6343)
fixed it.
I mistakenly added
inside the activity it should be outside the
I'm having the same issue but "inside the activity it should be outside the and inside tag" is unclear to me. Can someone clarify?
fixed it.
I mistakenly added
<meta-data android:name="io.branch.sdk.BranchKey" android:value="your_branch_key" />
inside the activity it should be outside the<activity>and inside<application>tag
@jayporta Here is the raw body. If anyone wonders
I have it out side the <activity> tag and inside <application> tag but still I'm getting these crashes, I also updated it to recent version 3.1.2 still getting these crashes!
Any update?
I was missing implementation 'com.android.installreferrer:installreferrer:1.1' for the v3.1.2.
Thanks for that. We need to update our docs for using Android 4.3.2.
Most helpful comment
@jayporta Here is the raw body. If anyone wonders