Bug P2
Status Update
Comments
an...@brightinventions.pl <an...@brightinventions.pl> #2
Update: I was going to write Gradle 5.6.2 instead of just 5.6. Sorry for the mistake.
an...@brightinventions.pl <an...@brightinventions.pl> #3
I was able to find the actual "STRING_TOO_LARGE" occurrence using:
aapt2 dump xmltree --file res/drawable-anydpi-v24/ic_my_vector_image.xml app-debug.apk
But it was possible because the app has already crashed and the stacktrace was pointing to the resource ID so I knew which file I should look for.
I think there should be some way to use AAPT and find all such resources containing "STRING_TOO_LARGE" instead of waiting for the app to crash first.
aapt2 dump xmltree --file res/drawable-anydpi-v24/ic_my_vector_image.xml app-debug.apk
But it was possible because the app has already crashed and the stacktrace was pointing to the resource ID so I knew which file I should look for.
I think there should be some way to use AAPT and find all such resources containing "STRING_TOO_LARGE" instead of waiting for the app to crash first.
Description
- Gradle: 5.6
- Android Gradle plugin: 3.5.2
- Build tools: not specified in the project (latest downloaded version: 29.0.2)
Recently (during this week), all of a sudden, my builds started reporting the following errors (they do not fail the builds):
[Step 1/1] > Task :moduleA:generateDebugRFile
[Step 1/1] error: string too large to encode using UTF-8 written instead as 'STRING_TOO_LARGE'.
...
[Step 1/1] > Task :app:mergeStageDebugResources
[Step 1/1] error: string too large to encode using UTF-8 written instead as 'STRING_TOO_LARGE'.
...
[Step 1/1] > Task :moduleB:processDebugUnitTestManifest
[Step 1/1] error: string too large to encode using UTF-8 written instead as 'STRING_TOO_LARGE'.
etc. (there are more errors of the same type happening for other modules as well)
I suspected the 'STRING_TOO_LARGE' would be written somewhere in the resources so I used both aapt and aapt2 to dump them and grep, e.g.
aapt dump --values resources app-debug.apk | grep STRING_TOO_LARGE
aapt2 dump resources app-debug.apk | grep STRING_TOO_LARGE
But I found nothing.
Is this a known issue? Should I ignore such errors? Is there any other way I could use to check if any 'STRING_TOO_LARGE' was actually written?