-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Build failed with Invalid <color> for given resource value. error #1714
Comments
Might be easy to scan the When using a hello world app project to test your plugins, Start the build with no plugins installed to rule out that a basic hello world doesn't actually reproduce your issue in your environent. Then proceed to install one plugin at a time and rebuilding after each plugin install. Let us know what you find. |
I just find out that is the cordova plugin googlemaps givin this error. My app is purely based on this plugin. This error came out in this update. I have a project with android 12 that work pretty well with the same versions. Anything i can do to solve this? |
steps i took to find out
|
I assume you mean https://github.com/mapsplugin/cordova-plugin-googlemaps/tree/master My workplace utilises this plugin as well, unfortunately the original author no longer maintains it. If you're using the original version, the gmaps the plugin installs by default is quite dated. The plugin also doesn't have I did run a dev build of cordova-android@13 against my apps awhile back (approx. a year ago...) without issue. Maybe because my apps are using a more recent version of gmaps sdk. You could try applying totalpave/cordova-plugin-googlemaps@f74b8e4 to your own fork to see if it solves your issue. The original plugin has the ability to set the version via |
For what it's worth I just updated one of my apps to use cordova-android@13 and didn't encounter build issues with google maps plugin. I also reverted those versions back down to what is in the original repo and didn't reproduce the issue either. If you could package up and share your sample reproduction issue that reproduces your issue I can try taking a deeper look. |
Any idea how i can show it to you ? I just create an empty cordova project with cordova 12 and add the android 13, installed this plugin: |
I cannot explain why downgrading my version numbers didn't reproduce the issue but using the original authored plugin on a base hello world project does reproduce the issue. Likewise updating the version numbers doesn't correct it either. This is out of scope of cordova-android but I'll spend a few minutes digging to see if I can find an explanation. |
K so my original statement is wrong, it is a bug with cordova-android introduced by #1700 It looks like the intent is to set the default background color to white (#FFFFFF) but it seems like it ends up defaulting to
Definitely threw me off leading to believe the issue is elsewhere. If you explicitly set the Do note that the google maps plugin has several other issues and will not build without further changes. But the Edit: I'm not entirely sure if #1700 is to blame but I don't think I encountered this in my testing in my own apps because I do have Edit 2: I observe the android platform being set up properly but it turns to 0 if the build errors for some reason. e.g. building with gmaps without supplying an API key causes a build error and when that occurs the value in |
So even fixing this problem i may found problems with the android13 version using the maps plugin ? |
Ok, i just tested here, find some errors with permissions and with the transpiling the plugin googlempas to fit in android13 standards, so now the googlemaps plugin will need to be upgraded to fit in the android13 version. Thanks for your help! If you find any repo or method to adapt the current googlemaps plugin to work in this android13 version share with me please :D |
Update: This fork https://github.com/TSFArg/cordova-plugin-googlemaps/tree/master have a version that work pretty well with the android 13 version. It only work setting the "AndroidWindowSplashScreenBackground" in the config.xml Edit: The right link to the maps plugin is this one: https://github.com/marutifh/cordova-plugin-fcm-with-dependecy-updated/tree/master |
@eduardojmrosa Thanks for sharing the fork for the fixed google maps plugin. The link points to https://github.com/apache/cordova-android/issues/fork and not https://github.com/TSFArg/cordova-plugin-googlemaps/tree/master. Maybe you can edit this :) Do you have already good experiences with this fork? |
Greetings, i have to update this thread. This isnt the version of the mapsplugins that works well in the New Android version. Ill edit soon. |
package android.support.annotation does not exist error in my side |
I had this problem and searched in various places until I found what I was looking for. I created a new project and added the plugins one by one, testing each time. After installing each plugin and testing, there were no errors. So, I copied the config.xml file from the project where I was having issues, and when I tried to compile, it gave me an error. I deleted groups of lines until I found my problem. The line was the following:
Changing "white" to "#ffffff" worked for me. This happened only after updating to Android 13.0.0. Just for the record I have these plugins: cordova-plugin-app-version 0.1.14 "AppVersion" |
@breautek @eduardojmrosa
for the |
Hi, my project as cordova 12 with android 12 and i just update the android platform to 13, i change my jdk version to 17 and my gradle to 8.7 but when i run the cordova run android it keep send me this error
Already removed the platform, added it back. Clear the gradle cache and force npm cache clear.
The text was updated successfully, but these errors were encountered: