android-branch-deep-linking-attribution
android-branch-deep-linking-attribution copied to clipboard
ActivityThread Caused by java.lang.ClassNotFoundException Didn't find class "io.branch.referral.InstallListener"
I updated branch SDK from 4.2.1 to the latest 5.0.4, after I publish these changes to the store I got a long list of ActivityThread crashes on firebase, can anyone tell me how to fix it I check the docs but I didn't find anything
Please check the following log
Fatal Exception: java.lang.RuntimeException Unable to instantiate receiver io.branch.referral.InstallListener: java.lang.ClassNotFoundException: Didn't find class "io.branch.referral.InstallListener" on path: DexPathList[[zip file "/data/app/com.creativeinnovations.mea-NSPFqM2PtXEVqHmKBGyUUQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.creativeinnovations.mea-NSPFqM2PtXEVqHmKBGyUUQ==/lib/arm64, /data/app/com.creativeinnovations.mea-NSPFqM2PtXEVqHmKBGyUUQ==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
Thank you in advance
Hey @amer360,
Wanted to follow up on this and see if you were able to resolve the crashes. With the major release of 5+ we introduced new methods of Branch initialization to handle app lifecycle methods which could certainly affect the previous handling.
Hey @jf-branch, this issue still persists in the latest Branch SDK. See logs below:
Fatal Exception: java.lang.RuntimeException: Unable to instantiate receiver io.branch.referral.InstallListener: java.lang.ClassNotFoundException: Didn't find class "io.branch.referral.InstallListener" on path: DexPathList[[zip file "/data/app/~~sKzUtLxdSARaU51HeDdiUQ==/<my_app_package_name>-krTvZ79pL9hO0ZsB5kiNsg==/base.apk"],nativeLibraryDirectories=[/data/app/~~sKzUtLxdSARaU51HeDdiUQ==/<my_app_package_name>-krTvZ79pL9hO0ZsB5kiNsg==/lib/arm64, /data/app/~~sKzUtLxdSARaU51HeDdiUQ==/<my_app_package_name>-krTvZ79pL9hO0ZsB5kiNsg==/base.apk!/lib/arm64-v8a, /system/lib64, /system/system_ext/lib64]]
at android.app.ActivityThread.handleReceiver(ActivityThread.java:4726)
at android.app.ActivityThread.access$1800(ActivityThread.java:310)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2292)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8669)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Min SDK: 21 Target SDK: 31 Branch SDK used: 5.1.5
I've also removed the previously optional receiver from manifest:
<receiver android:name="io.branch.referral.InstallListener" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
The crashes are reported primarily on Android 12 & Android 11 devices in crashlytics. Interestingly, all of these devices are in background state.
Any help on this would be appreciated. 😄