infobip / mobile-messaging-react-native-plugin

Mobile Messaging SDK plugin for React Native projects
24 stars 4 forks source link

Android App keeps on crashing in InfoBip in the new version #39

Closed ahadtechcarrot closed 2 years ago

ahadtechcarrot commented 2 years ago

Hi,

I set up infobip in react-native for Android and IOS but the app keeps on crashing in Android and I am receiving the below error message. Can someone please suggest to me if in Android we require some additional manual setup or if I have done the wrong setup?

Below are some details for your reference :

Versions :

"react-native": "0.63.3",
"infobip-mobile-messaging-react-native-plugin": "^5.0.1",
"@react-native-firebase/analytics": "^12.0.0",
"@react-native-firebase/app": "^12.0.0",
"@react-native-firebase/auth": "^12.0.0",
"@react-native-firebase/crashlytics": "^12.0.0"

In strings.xml file, I have defined :

<string name="google_app_id">"My App Id"</string>

Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceId" on path: DexPathList[[zip file "/data/app/~~LsEr1EAoWnoUpWPd8vta6w==/com.reelCinema.Screens.stage-KybA6KzW0TWuWenw4tqH-g==/base.apk"],nativeLibraryDirectories=[/data/app/~~LsEr1EAoWnoUpWPd8vta6w==/com.reelCinema.Screens.stage-KybA6KzW0TWuWenw4tqH-g==/lib/x86, /data/app/~~LsEr1EAoWnoUpWPd8vta6w==/com.reelCinema.Screens.stage-KybA6KzW0TWuWenw4tqH-g==/base.apk!/lib/x86, /system/lib, /system_ext/lib]]

kostap13 commented 2 years ago

Hi @ahadtechcarrot

Previously we had similar issue at flutter plugin. Idea of solution was to use apply plugin: 'com.google.gms.google-services'

Sample PR for flutter you can find here: https://github.com/infobip/mobile-messaging-flutter-plugin/pull/4/files#diff-39ab2ed24002fb8e39b9db8ebac35907f77395dbc3c2faf95e6e6b6805e0b9ceR59

Take a look at android/app/build.gradle and android/build.gradle

Best regards

ahadtechcarrot commented 2 years ago

Hi @kostap13 Thank you for your help, now the notifications are coming in the Android App as well.