-
Notifications
You must be signed in to change notification settings - Fork 998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google Services Version Conflict after adding FCM Plugin #499
Comments
In platforms > android > cordova-plugin-fcm > youapp-FCMPlugin.gradle, remove the lines In platforms > android > build.gradle, add In platforms > android > app > build.gradle, add If this does not work, change lines 68 and 69 (framework tags) of plugins > cordova-plugin-fcm > plugin.xml to |
In platforms > android > cordova-plugin-fcm > app-FCMPlugin.gradle
In platforms > android > build.gradle
IF REQUIRED : In plugins > cordova-plugin-fcm > plugin.xml to
|
@VRZ78 I tried to apply your recommendations but I get this output:
Cordova plugins I have installed:
i added this line at the end of /android/build.gradle |
@andreandev I have the same issue when I tried to apply recommendations of @VRZ78 |
@andreandev Did you put it at the end of android/app/build.gradle or android/build.gradle ? You need to put it in android/app/build.gradle |
@VRZ78 this path android/app/build.gradle not exist in ionic project with android cordova 6.4.0, only android/build.gradle. |
@VRZ78 thanks for the help, doesn't work for me as well. This is the error I get after applying your steps:
Am using ionic 3.20.0 with Android 7.0 and FCM 2.1.2:
This is line 68-9 in file
|
@flarco You need to change your dependencies in platforms/android/project.properties from to com.google.firebase:firebase-messaging:11.8.0 You should use phonegap-plugin-push@2.1.3, you only need to have installed cordova android 6.4.0 or 6.3.0 and cordova-android-support-gradle-release. phonegap-plugin-push can be configured to use FCM o APNS in iOS |
@Juliocbr I have had no success with phonegap-plugin-push, I am not getting any registrationId nor am I getting any error. It's like nothing happens. The
|
@flarco this is my code that I use for receiving the notification:
in config.xml add the resource file tag (in root project folder add google-services.json file):
You need to install Android Support Repository (Android Studio) https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md ionic info: ionic (Ionic CLI) : 3.20.0 installation cordova platform rm android in your config.xml you should see this:
You could use the Firebase console Note: it's important add the correct package name to FCM console. |
@Juliocbr |
hi @flarco , Are you using phonegap-plugin-push? Is it really working with both android and ios? |
@alvinlee001 Yes I'm using |
@flarco Man, i just tried last night to move to phonegap-plugin-push, but my app died upon trying to subscribe to anything, or upon receiving a message i sent from FCM, on android. Do you guys ever faced the same problem? |
@alvinlee001 no... When I send a FCM message, it shows up as normal. Try re-installing the platform version? Make sure it's 6.3 or 6.4. Add / remove the plugins? Go through the steps @VRZ78 & @Juliocbr mentioned. |
@flarco Somehow I managed to make My solution:Comment out these lines in the FCMPlugin.gradle file (inside /plugins/cordova-plugin-fcm/src/android). Then change the plugin.xml of the FCM plugin to use a different version, in my situation 11.8.0. (inside /plugins/cordova-plugin-fcm/) Now, remove en add the android platform again, so the changes will have affect. The next step is I hope if anyone has this problem on this as well could leave a comment whether it works for you, and hope to help someone who is facing with this as well |
@alvinlee001 thanks for your solution. My project has FCM plugin and phonegap push plugin and It is working again. Regards!!! |
@aaronyamil You are welcome bro!! =) |
@alvinlee001 thanks for your solution. It worked for me too. |
@alvinlee001 this trows me a new error :(
|
@hitmacreed Erm, i am no expert on this, so i am unable to make any comment on this. There are some post which seem to suggest cleaning and rebuilding to solve it though. So sorry. |
Try on your build.gradle
|
@alvinlee001 do that, build the apk in the device emulator, cause a "the app has been stopped" error :( |
@alvinlee001 hi i tried your solution, errors solved but app crashes when launching. |
@Omazon @cikcoh I am sorry folks, in this case then maybe there are changes to the library(s) which might require a different solution (yet again). I really hope someone out there who dealt with this problem and found a solution can post their latest solution to share with other folks who suffer the same fate. So sorry |
@alvinlee001 hi, it's OK i found a solution that works for me. |
@cikcoh the link you shared is giving 404 not found. |
@alvinlee001 So for your solution to be complete: in the FCMPlugin.gradle file (inside /plugins/cordova-plugin-fcm/src/android). Now, remove en add the android platform again, so the changes will have affect. The next step is to change the build.gradle file of the android platform folder just do ionic cordova run android. |
@GBR-422777 not sure why the link directed to github when clicked. if you type the displayed url, the page exist. |
Facing the same issue for ionic 3 now. Case 1:
Case 2:
Cordova Build Successful but app not running on device/emulator("App has stopped"). |
Hello, I am facing below error while deploying the build for Android. I tried above steps as well. Error: Could not find an installed version of Gradle either in Android Studio, Cordova version - 7.1.0 Please help me out. Facgin from couple of days. |
I got same exactly issue. Thanks Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 10.+ |
I got same issue. |
I've used @sirius2013 answer with cordova-plugin-fcm-with-dependecy-updated and a bunch of Google and Firebase plugins:
classpath 'com.google.gms:google-services:4.1.0'
framework src="com.google.firebase:firebase-core:11.0.4" /> |
I am having same issue but the version are different fmc is 10.+ and com.google.android.gms:play-services-maps:15.0.1 do u have any idea how to reslove this ? |
@KishanIos007 , It worked for me with following in plugin.xml
|
This fixed it for me after hours of plundering my code. I am using firebase, FCM, and google-services and they were all doing this: So I removed it from:
^ to make sure google services was only applied once. Also I made sure every *.gradle file in platform->android pointed to the same Then as a unexpected bonus I had to change the There I made sure |
This fix for me with this changes changing the from to and... changing the from to
i´m currently using Cordova 8.1.1 i have to run this fix to: |
in Ionic 3 Update file from plateform -> android -> project-properties target=android-27 and build it once again for android it working for me |
For person who is still facing this issue please install below plugin and it will solve all your error
Documentation : - https://www.npmjs.com/package/cordova-play-services-version-adapter |
Or not...
Didn't fix anything. Still forced to manually edit project.properties -file which totally sucks. Googled my ass off with this but yet to found a viable solution :( |
Thank you its working |
Nothing here works!! So.. Use this!!! Resolve all my problems. |
verbose statusCode 404 guys i have this issue please how can resolve it |
I need do send push notifications in my Ionic 3 app, after adding this FCM plugin I cannot run on Android (first testing only in Android) anymore, that's my situation bellow.
/platforms/android/project.properties
Ionic Info
I just added FCM plugin and when I try to run on Android device with:
ionic cordova run android -l -c
Even after I changing those 3 plugins to version 9.0.0 I keep getting errors.
Cordova plugins I have installed:
Any clue how I could solve this issue?
Thanks
The text was updated successfully, but these errors were encountered: