Open b-allard opened 4 years ago
@b-allard Hi, Could you please show the gradle file ?
Hi @AnanthaKrish, i have attached the project build.gradle and the app build.gradle (by adding .txt suffix to be uploaded directly on github)
app.build.gradle.txt project.build.gradle.txt
And the AndroidmManifest (idem with adding .txt suffix at the upload): AndroidManifest.xml.txt
@b-allard In your project open the android -> app -> build.gradle
file . Locate the dependencies{}
section and add apply plugin: 'com.google.gms.google-services'
. For reference use the below file,
build.gradle.zip
I have applied the modification at the app>build.gradle and now i have an other error :
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/iid/FirebaseInstanceIdService; at com.bmdpush.react.RNBmdPushReactPackage.createNativeModules(RNBmdPushReactPackage.java:16) at com.facebook.react.ReactPackageHelper.getNativeModuleIterator(ReactPackageHelper.java:42) at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:42) at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1298) at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1269) at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1194) at com.facebook.react.ReactInstanceManager.access$1000(ReactInstanceManager.java:132) at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:996) at java.lang.Thread.run(Thread.java:919) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceIdService" on path: DexPathList[[zip file "/data/app/com.-74AADXiwYGnzFV8A9mEMDQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.myapppackage [android.zip](https://github.com/ibm-bluemix-mobile-services/bms-push-react-native/files/4786591/android.zip) -74AADXiwYGnzFV8A9mEMDQ==/lib/x86, /data/app/com.myapppackage-74AADXiwYGnzFV8A9mEMDQ==/base.apk!/lib/x86, /system/lib, /system/product/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at com.bmdpush.react.RNBmdPushReactPackage.createNativeModules(RNBmdPushReactPackage.java:16) at com.facebook.react.ReactPackageHelper.getNativeModuleIterator(ReactPackageHelper.java:42) at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:42) at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1298) at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1269) at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1194) at com.facebook.react.ReactInstanceManager.access$1000(ReactInstanceManager.java:132) at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:996) at java.lang.Thread.run(Thread.java:919)
I have attached my gradles and manifest files: android.zip
@b-allard Could you please create a customer ticket?
Hi,
I have integrated your librairie in the last version ("bmd-push-react-native": "^1.4.0") on Android (React-Native project). However when I change my manifest, some elements are not found, write in red :
`
Gradle didn't find MFPPushNotificationHandler, MFPPushIntentService and MFPPush.
I have try to sync, clean and rebuild, nothing changes.
I have try to launch the project, but the app crash and I have the following message in the Android console :
Process:com.myapppackage, PID: 1590 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/iid/FirebaseInstanceIdService; at com.bmdpush.react.RNBmdPushReactPackage.createNativeModules(RNBmdPushReactPackage.java:16) at com.facebook.react.ReactPackageHelper.getNativeModuleIterator(ReactPackageHelper.java:42) at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:42) at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1298) at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1269) at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1194) at com.facebook.react.ReactInstanceManager.access$1000(ReactInstanceManager.java:132) at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:996) at java.lang.Thread.run(Thread.java:919) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.iid.FirebaseInstanceIdService" on path: DexPathList[[zip file "/data/app/com.myapppackage-386OxQUwvwu_aYpWqE-adQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.myapppackage-386OxQUwvwu_aYpWqE-adQ==/lib/x86, /data/app/com.myapppackage-386OxQUwvwu_aYpWqE-adQ==/base.apk!/lib/x86, /system/lib, /system/product/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at com.bmdpush.react.RNBmdPushReactPackage.createNativeModules(RNBmdPushReactPackage.java:16) at com.facebook.react.ReactPackageHelper.getNativeModuleIterator(ReactPackageHelper.java:42) at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:42) at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1298) at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1269) at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1194) at com.facebook.react.ReactInstanceManager.access$1000(ReactInstanceManager.java:132) at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:996) at java.lang.Thread.run(Thread.java:919)
Please could you help me ?
Thanks in advance,
Benjamin