Skip to content
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

Android installation of plugin fails if colors.xml already exists #1105

Open
ir2pid opened this issue Sep 5, 2019 · 2 comments
Open

Android installation of plugin fails if colors.xml already exists #1105

ir2pid opened this issue Sep 5, 2019 · 2 comments

Comments

@ir2pid
Copy link

ir2pid commented Sep 5, 2019

I get this error as another plugin has already created the colors.xml file and the plugin doesn't append but tries to copy it first.

Failed to install 'cordova-plugin-firebasex': CordovaError: Uh oh!
"/Users/xx/Workspace/xx/xx-xx-app/platforms/android/app/src/main/res/values/colors.xml" already exists!

Bug report

Current behavior:

use any plugin which adds colors to the res/values/colors.xml
simplest way is to create this file already.
Then try to install the plugin

Expected behavior:
line 59 of plugin.xml tries to copy the colors file and installation fails if it's already there.
<source-file src="src/android/colors.xml" target-dir="res/values" />

Steps to reproduce:

use any plugin which adds colors to the res/values/colors.xml
the simplest way is to create this file already.
Then try to install the plugin

Environment information

  • Cordova CLI version
  • Cordova platform version
    • cordova platform ls android 8.0.0 ios 4.5.5
  • Plugins & versions installed in project (including this plugin)
    • cordova plugin ls
plugin list com.adjust.sdk 4.18.0 "Adjust" cordova-clipboard 1.3.0 "Clipboard" cordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport" cordova-plugin-advanced-http 2.1.1 "Advanced HTTP plugin" cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx" cordova-plugin-androidx-adapter 1.1.0 "cordova-plugin-androidx-adapter" cordova-plugin-app-version 0.1.9 "AppVersion" cordova-plugin-camera 4.1.0 "Camera" cordova-plugin-device 2.0.3 "Device" cordova-plugin-file 6.0.2 "File" cordova-plugin-firebasex 6.1.0 "Google Firebase Plugin" cordova-plugin-inappbrowser 3.1.0 "InAppBrowser" cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard" cordova-plugin-ionic-webview 4.1.1 "cordova-plugin-ionic-webview" cordova-plugin-is-debug 1.0.0 "IsDebug" cordova-plugin-media 5.0.3 "Media" cordova-plugin-media-capture 3.0.3 "Capture" cordova-plugin-network-information 2.0.2 "Network Information" cordova-plugin-secure-storage 3.0.2 "SecureStorage" cordova-plugin-splashscreen 5.0.3 "Splashscreen" cordova-plugin-statusbar 2.4.3 "StatusBar" cordova-plugin-whitelist 1.3.4 "Whitelist" cordova-plugin-x-socialsharing 5.4.7 "SocialSharing" es6-promise-plugin 4.2.2 "Promise" phonegap-plugin-barcodescanner 8.1.0 "BarcodeScanner"


- Dev machine OS and version, e.g. - OSX ProductName: Mac OS X ProductVersion: 10.14.5 BuildVersion: 18F132

Android build issue:

  • Node JS version
    • node -v v10.14.0

Console output

console output


Failed to install 'cordova-plugin-firebasex': CordovaError: Uh oh!
"/Users/xx/Workspace/xx/xx-xx-app/platforms/android/app/src/main/res/values/colors.xml" already exists!



@tom-hartz
Copy link

tom-hartz commented Sep 23, 2019

FWIW I have an open PR on this repo to enable foreground notifications. I also fixed the colors.xml issue:
#1056

@kapilSoni101
Copy link

@tom-hartz : i edited plugin.xml with ur changes but got same error again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants