-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Strings.xml google_app_id conflict with google-services.json #1188
Comments
@cybermill yeah, FCM is not support by this plugin. It will be part of the 2.0.0 release which you can check out right now in the |
@macdonst: Ahhh. Thought it must be something like that. I was puzzled by the lack of chatter about it in the issues forum. I'll check out the 2.0 version after the holiday and provide some feedback. Great job with the plug-in. I used it with the iOS app and it works brilliantly. Thanks so much for all you do. |
here is the latest. The 2.0.x branch worked, but only after I commented out the strings.xml google_app_id as described in my bug report. If you do that, I have it working on my samsung device so hurray! Thanks for your help on this macdonst. |
Implementation notes:
|
I've never had to install a branch version like this before. I tried googling and couldn't figure it out. |
@leetheguy install via the github url:
I should have a release candidate out in npm sometime this week. |
add the next lines to "config.xml" file or just replace the spec version to "2.0.0-rc2"
then try to install |
Hi, v2.0.0-rc2 fails for me with another exception during cordova build process:
I have following plugins installed:
Any ideas? |
i had a lot of issues with phonegap-plugin-push, nowadays i have been working with "onesignal native plugin" for push notifications are great and free!, it's easy to work. Tell me if you want more information. |
Having same problem as @evereq:
Using 2.0.0-rc2 |
Javierfernandez93 Did the trick. BTW, i needed to upgrade my Cordova up to 6.4.0 to allow that plugin version be installed. |
hi @kirillgroshkov, what did you do? did you manage to so solve the problem
|
Hi @kirillgroshkov and @macdonst ; we have the same problem: Failed to apply plugin [id 'com.google.gms.google-services'] Is there already a fix or workaround for this now? Thanks! |
@rickgoud |
* Added partial Android FCM support (#975) * Modified plugin.xml to include FCM changes * Plugin.xml changes for FCM * Java changes for FCM * Increased plugin version to 2.0.0 * Increased plugin version in package.json * Added topic subscription/unsubscription * Removed some empty lines * Fixed empty token on android first run (#1008) * Removed GCM files and added FCM files * Added .framework files as custom frameworks * Changed code to work with FCM * Added hook and resource file to copy GoogleService-Info.plist * fixed registration and removed unused code * Use CocoaPods * Fix rebase errors * Fix topic subscription and unsubscription on FCM * Refactor GCMIntentService to FCMService * Issue #689: Remove sender id from PushNotification init Android options * Issue #689: Remove sender id from PushNotification init iOS options * 📝 Update to using fcm-node * 🐛 Issue #1188: Strings.xml google_app_id conflict with google-services.json * Add empty google services plist * Pin FCM to 9.8.0 * 🔧 Add browser platform back for FCM branch * 🔨🔧⬆️ Use Babel to transpile ES2015 code * 🔧 add tern to gitignore * 🔖 Bumping plugin version to 2.0.0-rc1 * 2.0.0-rc1 * Updating CHANGELOG * Fixing my merge error for PR #1378 Optional event emit instead of function call for action buttons * 🐛🍎 Issue #1461: App crashes when initialising with topics (v2.0.0-rc1) * 🐛🐧📝⬆️ #1460: Build Issue Android * 🐛🍎🔧 Fixing a merge issue where aps-environment was accidentally removed * 🐧📝🐛 Issue #1470: Cannot install phonegap-plugin-push on master * 📝 Using a newer version on the examples * 🍎🐛 Issue #1497: App crashes after refreshing when using FCM (v2) * Bumping plugin version to 2.0.0-rc2 * 2.0.0-rc2 * Updating CHANGELOG * Added partial Android FCM support (#975) * Modified plugin.xml to include FCM changes * Plugin.xml changes for FCM * Java changes for FCM * Increased plugin version to 2.0.0 * Increased plugin version in package.json * Added topic subscription/unsubscription * Removed some empty lines * Removed GCM files and added FCM files * Changed code to work with FCM * Added hook and resource file to copy GoogleService-Info.plist * Use CocoaPods * Fix rebase errors * Issue #689: Remove sender id from PushNotification init Android options * 🐛 Issue #1188: Strings.xml google_app_id conflict with google-services.json * Pin FCM to 9.8.0 * 🔧 Add browser platform back for FCM branch * 🔨🔧⬆️ Use Babel to transpile ES2015 code * 🔧 add tern to gitignore * 🔖 Bumping plugin version to 2.0.0-rc1 * 🐛🐧📝⬆️ #1460: Build Issue Android * Bumping plugin version to 2.0.0-rc2 * Added partial Android FCM support (#975) * Modified plugin.xml to include FCM changes * Plugin.xml changes for FCM * Java changes for FCM * Increased plugin version to 2.0.0 * Increased plugin version in package.json * Added topic subscription/unsubscription * Removed some empty lines * Removed GCM files and added FCM files * Added hook and resource file to copy GoogleService-Info.plist * Use CocoaPods * Fix rebase errors * 🐛 Issue #1188: Strings.xml google_app_id conflict with google-services.json * Updating CHANGELOG * ✏️ fixing error in CHANGELOG * Bumping plugin version to 2.0.0-rc2 * Updating CHANGELOG * Added partial Android FCM support (#975) * Modified plugin.xml to include FCM changes * Plugin.xml changes for FCM * Java changes for FCM * Increased plugin version to 2.0.0 * Increased plugin version in package.json * Added topic subscription/unsubscription * Removed some empty lines * Removed GCM files and added FCM files * Changed code to work with FCM * Added hook and resource file to copy GoogleService-Info.plist * fixed registration and removed unused code * Use CocoaPods * Fix rebase errors * Issue #689: Remove sender id from PushNotification init Android options * Issue #689: Remove sender id from PushNotification init iOS options * 🐛 Issue #1188: Strings.xml google_app_id conflict with google-services.json * 🔧 add tern to gitignore * 🔖 Bumping plugin version to 2.0.0-rc1 * Bumping plugin version to 2.0.0-rc2 * Remove hook and use resource-file tag to copy google services file * Add resource-file way of copying google services files * Bump requirements * 🔧 Update cordovaDependencies * 🔖 Bumping plugin version to 2.0.0-rc3 * 2.0.0-rc3 * Updating CHANGELOG * Fixes 'framework not found GoogleToolboxForMac' linker error in 2.0.0-rc3 (#1715) * Remove unused files (#1732) * Remove GTM framework. (#1739)
I tried all the version of phonegap-plugin-push but still facing the issue:
Ionic Info Phonegap plugins I followed this link to install push notification Using this command: I am facing duplicate app id issue: Please help |
For me, com.google.gms.google-services was already installed, so I could remove from /platforms/android/phonegap-push-plugin/[appname]-push.gradle:
Seems like the 'apply plugin' gradle command needs some check if 'plugin' doesn't already exist. |
Fixed in the 2.0.0 release candidates. |
Hi @macdonst , sorry to bother again. I'm getting bit by this (duplicate resources for google_app_id and google_api_key) using version 2.1.3 of the plugin (cordova-android 6.4.0). I am using the following plugins:
Any suggestions would be much appreciated! |
This thread has been automatically locked. |
Expected Behavior
App compiles, Push notifications work, angels sing, the crowds rejoice
Actual Behavior
I get an error with gradle.
Error: Duplicate resources
I've traced the issue to the Strings.xml google_app_id which conflicts with the values.xml that gets generated from the google-services.json
If I comment out the strings.xml line
<!--string name="google_app_id">1234567890123456</string-->
then all compiles.
Reproduce Scenario (including but not limited to)
Google is making developers move from the cloud services to firebase-messaging.
When setting this up, google generates a google-services.json file which gets put at the base of the project.
Steps to Reproduce
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
android
I'm compiling in Android Studio 2.1.3
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
N/A
Cordova CLI version and cordova platform version
Plugin version
phonegap-plugin-push 1.8.0 "PushPlugin"
Sample Push Data Payload
Sample Code that illustrates the problem
Logs taken while reproducing problem
:processDebugGoogleServices
Parsing json file: /Users/jeffwalters/Documents/phonegap apps/pushnotification/platforms/android/google-services.json
:generateDebugResources
:mergeDebugResources
Error:Error: Duplicate resources
:mergeDebugResources FAILED
Error:Execution failed for task ':mergeDebugResources'.
The text was updated successfully, but these errors were encountered: