-
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
Cordova android 11 clean command purge resources files #1553
Comments
Has anyone posted this error in vue cli? My problem is that I use an older version of you and for some reason I cannot update to the newest it gives me all kinds of web pack errors. |
@4lyn what version of the VUE CLI are you using? |
The other thing is that there's really no code changes except for a couple exported= true statements to support 32 |
@jonathanalberghini I'm not sure I see the link with Vue CLI here. I do |
Maybe I'm mistaken and it's really android 11 and it's just happens I'm using the VUE CLI. |
I never said Can you explain why you think that custom resource files should not be cleaned? I would like to understand your perspective. |
In my case with cordova 11 they are cleaned before the build has completed. `$ cross-env CORDOVA_PLATFORM=android vue-cli-service cordova-build-android ⠼ Building for production... WARNING Compiled with 2 warnings 10:06:08 AM warning asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). warning entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. File Size Gzipped www/js/chunk-vendors.49a6bc86.js 651.74 KiB 210.66 KiB Images and other types of assets omitted. DONE Build complete. The www directory is ready to be deployed. INFO executing "cordova clean" in folder /Users/jalberghini/src/opportunistic-trader-mobile Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 747ms Configure project :app Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. See https://docs.gradle.org/7.4.2/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 941ms User defaults from command line: ** CLEAN SUCCEEDED ** Running command: xcodebuild -project Opportunistic Trader.xcodeproj -configuration Release -alltargets clean User defaults from command line: ** CLEAN SUCCEEDED ** INFO executing "cordova build android --release" in folder /Users/jalberghini/src/opportunistic-trader-mobile |
None of that outfit makes any sense why is it running Xcodebuild building iOS I'm just building the android package. |
@breautek ok Reading again your #1551 (comment) I get it now
Sorry for wasting tour time here. I'll close this issue. |
No worries. At the very least I think we have confirmed that the issue is not within Cordova. I'm not familiar with the Vue CLI but we have confirmed that both cordova-android@10 and 11 boths cleans and restructures the project files up appropriately, as expected. With this information, at least it can be brought to Vue's attention, or whoever maintains the Vue CLI. Perhaps they are doing a lot of stuff manually instead of relying on the Cordova CLI. |
In my case it has nothing to do with Vue CLI either. I just happen to use it also |
@breautek I ran into the same issue as that of @4lyn What is going on? |
Not sure, but I can say that I have a resource file defined by I'd suggest trying to update (you'll need cordova-android@12 for API 33/Google Play compliance anyway). If it still fails, then I'd suggest creating a support discussion at Apache Cordova Discussions. |
For anyone else checking here, I took the same approach of modifying the theme but directly in the <platform name="android">
<!-- ... -->
<config-file target="app/src/main/res/values/themes.xml" parent="/resources/style">
<item name="android:windowLayoutInDisplayCutoutMode">never</item>
</config-file>
</platform> Seems to work so far! Not sure if there is a disadvantage to using this approach as compared to copying the theme. |
Bug Report
Problem
All files listed in
resource-file
tag inconfig.xml
are purged aftercordova clean android
They are still some resources files like
colors.xml
/strings.xml
/themes.xml
But all custom files from the config disappear. It also happens to the files in the
res/native/android/res/values-v21
directoryWhat is expected to happen?
cordova clean android
should not clean resource filesAs explained in this #1551 (comment) by @breautek
What does actually happen?
After
cordova prepare android
these files are present, but if I runcordova clean android
they disappearAnd changing the target as explained in this #1461 (comment) by @erisu doesn't help
Information
Reproduce without any plugins in Cordova CLI 11.1.0 / Cordova Android 11.0.0
But also in Cordova CLI 10.0.0 / Cordova Android 10.1.1
So it might be linked to the other upgrade I had to make
Everything was fine before.
Command or Code
Environment, Platform, Device
Linux mint 19.3 (Ubuntu 18.04)
Version information
Java JDK: installed 11.0.18
Android SDK: installed true
Android target: installed android-33,android-32,android-31,android-30,android-23
Gradle: installed /opt/gradle/gradle-7.4.2/bin/gradle
Checklist
colors.xml
fileThe text was updated successfully, but these errors were encountered: