Open JoshTor opened 6 years ago
Nobody have the solution ..? Please help I found nothing ...
It's probably a conflict with other plugin... try to create a brand new cordova project and install only this plugin. After that, install one by one the other plugins to find which one is the source of the error. Hope it helps.
I'm having the same problem here today. If I remove my reference to colors.xml
from my config.xml
I'm able to install the plugin, but this obviously screws up notification colors.
From config.xml
:
<resource-file src="resources/android/colors.xml" target="app/src/main/res/values/colors.xml" />
<config-file parent="/manifest/application" target="AndroidManifest.xml">
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/primary" />
</config-file>
Any workaround here? I'm not sure how to use the firebase plugin and not have broken notification colors for now.
Ionic:
ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic1 1.3.5
@ionic/v1-toolkit : 1.0.22
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4
Cordova Plugins : cordova-plugin-ionic-webview 2.4.1, (and 23 other plugins)
System:
Android SDK Tools : 26.1.1 (/Users/xxxxxx/Library/Android/sdk)
ios-deploy : 2.0.0
ios-sim : 6.1.2
NodeJS : v8.11.3 (/usr/local/bin/node)
npm : 5.6.0
OS : macOS Mojave
Xcode : Xcode 10.2 Build version 10E125
I'm having the same problem faced by @kevinswartz. I need to create some custom colors, but this plugin creates the file colors.xml. When I try to update the file, this error occurs. @kevinswartz, did you find a workaround for this?
Hey @jordanorc I did, but my workaround sucks. Basically you can't rely on cordova to install the firebase plugin properly when restoring a platform. So before you add your platform, remove the firebase plugin, and remove those lines referencing colors.xml
from your config.xml
. Once the platform has been added, add the colors.xml
lines back to your config, then re-add the firebase plugin. I would LOVE a better option, as this pretty much ruins my build process.
@kevinswartz, thank you for the response. I found a solution using config-file:
<config-file parent="/resources" target="app/src/main/res/values/colors.xml">
<color name="notification">#0B6E45</color>
</config-file>
When building the application for the first time, a warning message will appear:
config file app/src/main/res/values/colors.xml requested for changes not found at .../platforms/android/app/src/main/res/values/colors.xml, ignoring
However, the file will be merged as requested during the build process. So, it works as expected. My settings are:
Ionic:
ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.9
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4
Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 22 other plugins)
System:
Android SDK Tools : 26.1.1 (/home/xxxx/Android/Sdk)
NodeJS : v8.11.4 (/usr/bin/node)
npm : 6.5.0
OS : Linux 4.18
@jordanorc Good idea! I'll try that out.
Just to follow up on the workaround from @jordanorc . It's working for me here. Here's the lines I used for notitication colors in my config.xml
:
<config-file parent="/resources" target="app/src/main/res/values/colors.xml">
<color name="custom_primary">#FF007CD3</color>
</config-file>
<config-file parent="/manifest/application" target="AndroidManifest.xml">
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/custom_primary" />
</config-file>
Excellent news @kevinswartz. I'm glad I could help.
I am hitting this issue, and I don't have a config.xml and firebase is the only plugin being installed.
Hi ! I don't know why the plugin don't want to install ..
I tried step by step with and without the google-services.json file generate on firebase :
I don't understant what's wrong...