Assigned
Status Update
Comments
ra...@google.com <ra...@google.com> #2
We have shared this with our product and engineering team and will update this issue with more information as it becomes available.
No update yet.
Description
In the "Shrink your Resources" documentation, in the section "Customize which resources to keep" (see
"Save this file in your project resources, for example, at res/raw/my.package.keep.xml. The build does not package this file into your app."
In the next paragraph, there is a reference to a resource file named "my.package.build.variant.keep.xml".
The documentation refers to file names that contain invalid characters. The period character is not allowed in a resource file name. File-based resource names must contain only lowercase a-z, 0-9, or underscore.
Using the file name in the documentation results in the following build error:
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> /Users/username/AndroidStudioProjects/MyApplication/app/src/main/res/raw/my.package.keep.xml: Error: '.' is not a valid file-based resource name character: File-based resource names must contain only lowercase a-z, 0-9, or underscore
Proposed Fix
Replace the period '.' with an alternative character, such as underscore '_' (e.g. res/raw/my_package_keep.xml). Alternatively, the period '.' character can be removed from the file names (e.g. res/raw/mypackagekeep.xml).
URL:
Browser: Chrome 133.0.6943.99
OS version: macOS 15..1