Description:
I'm trying to receive notification on Android simulator, it appears and then application crashes with this error java.lang.AbstractMethodError: abstract method "void com.google.firebase.iid.zzb.zzd(android.content.Intent)
Environment
OneSignal React-Native SDK: 3.2.5,
OneSignal Gradle Plugin: 0.11.0,
Emulator: Nexus 9 API 26
Steps to Reproduce Issue:
Stacktrace:
FATAL EXCEPTION: Firebase-FirebaseMessagingService
Process: com.nfl.mobile3.debug, PID: 24221
java.lang.AbstractMethodError: abstract method "void com.google.firebase.iid.zzb.zzd(android.content.Intent)"
at com.google.firebase.iid.zzg.run(Unknown Source:26)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at com.google.android.gms.common.util.concurrent.zza.run(Unknown Source:7)
at java.lang.Thread.run(Thread.java:764)
@andrewworld This error means there was a mixture of different Firebase modules versions included in your app. If you add our OneSignal Gradle Plugin this will fix the version issue in your project and should resolve that runtime error.
https://documentation.onesignal.com/docs/react-native-sdk-setup#section-adding-the-gradle-plugin
If you already have this in your build.gradle
, make sure it the section noted in the docs is at line 1 of the file. Also make sure this is added to your app/build.gradle
instead of the android/build.gradle
or the root one.
@andrewworld did that resolve the problem?
Closing due to no response, I'm assuming jkasten2's suggestion fixed the issue for you. If not, please feel free to respond and we'll be happy to reopen and help to investigate
Most helpful comment
@andrewworld This error means there was a mixture of different Firebase modules versions included in your app. If you add our OneSignal Gradle Plugin this will fix the version issue in your project and should resolve that runtime error.
https://documentation.onesignal.com/docs/react-native-sdk-setup#section-adding-the-gradle-plugin
If you already have this in your
build.gradle
, make sure it the section noted in the docs is at line 1 of the file. Also make sure this is added to yourapp/build.gradle
instead of theandroid/build.gradle
or the root one.