Android Question Error after moving to sdk 31

fastlingo

Member
After targeting sdk 31, I get this error in crashlytics:

Fatal Exception: java.lang.RuntimeException: Unable to instantiate receiver com.google.firebase.iid.FirebaseInstanceIdReceiver: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceIdReceiver" on path: DexPathList[[zip file "/data/app/com.fastlingo.englishstarter-LoSCyIyrPHxDg6DSujghiQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.fastlingo.englishstarter-LoSCyIyrPHxDg6DSujghiQ==/lib/x86, /system/lib, /vendor/lib]]
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Update to B4A v12.
Delete your Android SDK.
Download the latest one.

 
Upvote 0

Filippo

Expert
Licensed User
Longtime User
Hi,

I have exactly the same error with the new versione B4a V12.0.
What else could be the problem?
Fatal Exception: java.lang.RuntimeException: Unable to instantiate receiver com.google.firebase.iid.FirebaseInstanceIdReceiver: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceIdReceiver" on path: DexPathList[[zip file "/data/app/fg.speedpilot_lite-Vk7eLFHOh9tLBwnGa5usmw==/base.apk"],nativeLibraryDirectories=[/data/app/fg.speedpilot_lite-Vk7eLFHOh9tLBwnGa5usmw==/lib/x86, /system/lib, /vendor/lib]]
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3171)
at android.app.ActivityThread.-wrap17()
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
1669229945363.png
 
Upvote 0

fastlingo

Member
Hello Erel, followed your instructions and released a new version with those lines in the main module but still got the same error in Crashlytics from the new version.
 
Upvote 0

jo1234

Active Member
Licensed User
Longtime User
Same here.
I still get this error in CrashLytics on an Android 8.1.0 device (Nexus 5, device state: background) after adding the two #additionaljar lines listed above.

Fatal Exception: java.lang.RuntimeException: Unable to instantiate receiver com.google.firebase.iid.FirebaseInstanceIdReceiver: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceIdReceiver" on path: DexPathList[[zip file "/data/app/xxx/base.apk"],nativeLibraryDirectories=[/data/app/xxx/lib/x86, /system/lib, /vendor/lib]]
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3171)
at android.app.ActivityThread.-wrap17()
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

Caused by java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceIdReceiver" on path: DexPathList[[zip file "/data/app/xxx/base.apk"],nativeLibraryDirectories=[/data/app/xxx/lib/x86, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3166)
at android.app.ActivityThread.-wrap17()
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

Thanks,
Johannes
 
Last edited:
Upvote 0

fastlingo

Member
Also on the same Nexus 5X I get this error in Crashlytics
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp/com.android.billingclient.api.ProxyBillingActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.IntentSender android.app.PendingIntent.getIntentSender()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
 
Upvote 0

fastlingo

Member
The mentioned class is included. There is probably another one that is missing and it is specific to this device. Are you able to reproduce it yourself? I tested it on multiple devices and it worked fine.
I was never able to reproduce it and it only happened with nexus 5
 
Upvote 0
Top