Closed ChinaGc closed 8 months ago
like this
Are you using any obsfucation plugins like proguard?
If so, it would do stuff like this
Are you using any obsfucation plugins like proguard?
If so, it would do stuff like this
Hi,Thank you for your reply, this is a newly created project, without any configuration, and without adding any plugins.
This is caused by Android Gradle Plugin 4.2 defaulting to android.enableResourceOptimizations=true (which will be the only option in future) - source.
On other side, you are supposed to read these files using corresponding resource identifier in Android code using corresponding API call. Alternatively files you want to read in a Cordova application outside a Cordova plugin should be inside the assets folder or ideally within Cordova www folder, which gets copied to assets/www in final APK file.
@faugusztin
Good find.
Starting in Gradle 8 it will be forcefully enabled as shown in their source.
Gradle 8 will be used in our next major so I don't see any point in adding any kind of feature to change this.
Alternatively files you want to read in a Cordova application outside a Cordova plugin should be inside the assets folder or ideally within Cordova www folder, which gets copied to assets/www in final APK file.
Also true
Closing as won't fix.
Bug Report
Problem
What is expected to happen?
Image resources do not want to be renamed
What does actually happen?
has renamed
Information
Command or Code
Environment, Platform, Device
Version information
Checklist