Status Update
Comments
bi...@gmail.com <bi...@gmail.com> #2
Retraced stack trace:
Caused by: java.lang.UnsupportedOperationException: Operation is not supported for read-only collection
at com.android.tools.r8.jetbrains.kotlin.collections.EmptyList.removeAll(Collections.kt)
at com.android.tools.r8.resourceshrinker.r8integration.LegacyResourceShrinker.run(LegacyResourceShrinker.java:228)
at com.android.tools.r8.R8.shrinkResources(R8.java:991)
at com.android.tools.r8.R8.runInternal(R8.java:894)
at com.android.tools.r8.R8.runInternal(R8.java:259)
at com.android.tools.r8.R8.lambda$runForTesting$1(R8.java:243)
at com.android.tools.r8.internal.Nu.a(R8_8.9.27_3afcc9fea5cc5cd06373667ec09d5fe106db8a4a77576689534e667542385a93:28
mc...@google.com <mc...@google.com> #3
This is happening when there are no unused resources at all and we have duplicated resources between the feature and base (or different features)
Reproduction here:
Fix here:
For the reporter to work around this:
- Disable resource shrinking in this case, it will have no effect since there are no unused resources for this build
- Use legacy AGP embedded shrinker - set android.r8.integratedResourceShrinking false in your settings
- Manually update to a new R8 version (I will post a follow up when this is on our release branch)
yi...@googlemail.com <yi...@googlemail.com> #4
Thanks!
ms...@google.com <ms...@google.com>
[Deleted User] <[Deleted User]> #5
Project: r8
Branch: main
Author: Rico Wind <
Link:
Fix usage of Immutable list in resource shrinker
Expand for full commit details
Fix usage of Immutable list in resource shrinker
The returned list is mutable unless it is empty, allways create a copy.
Bug: b/401546693
Change-Id: I9ea50d23c365ea59e1f6ae5e13a02048daa8b5f8
Files:
- M
src/resourceshrinker/java/com/android/build/shrinker/r8integration/LegacyResourceShrinker.java
- M
src/test/java/com/android/tools/r8/androidresources/DuplicatedEntriesEmptyUnusedTest.java
Hash: dc5cae852ee11d42456d275afb1837d1f770306f
Date: Mon Mar 10 17:56:18 2025
wo...@gmail.com <wo...@gmail.com> #6
Project: r8
Branch: main
Author: Rico Wind <
Link:
Add reproduction of adding to immutable list in resource shrinker
Expand for full commit details
Add reproduction of adding to immutable list in resource shrinker
This happens if the list returned from the model is empty, in which case it is immutable
Bug: b/401546693
Change-Id: Ib596242df6e3299f19ff00a03dbe43bde79e13c0
Files:
- A
src/test/java/com/android/tools/r8/androidresources/DuplicatedEntriesEmptyUnusedTest.java
Hash: 429ddad6ffce418ebaf482277ee8e96a68ab18e4
Date: Mon Mar 10 17:51:07 2025
lo...@gmail.com <lo...@gmail.com> #7
Project: r8
Branch: 8.9
Author: Rico Wind <
Link:
Add reproduction of adding to immutable list in resource shrinker
Expand for full commit details
Add reproduction of adding to immutable list in resource shrinker
This happens if the list returned from the model is empty, in which case it is immutable
Bug: b/401546693
Change-Id: Ib596242df6e3299f19ff00a03dbe43bde79e13c0
Files:
- A
src/test/java/com/android/tools/r8/androidresources/DuplicatedEntriesEmptyUnusedTest.java
Hash: 2f90d4133d2af07c954dceddb1ae47cc28e7b9d8
Date: Tue Mar 11 10:54:07 2025
y2...@gmail.com <y2...@gmail.com> #8
Project: r8
Branch: 8.9
Author: Rico Wind <
Link:
Fix usage of Immutable list in resource shrinker
Expand for full commit details
Fix usage of Immutable list in resource shrinker
The returned list is mutable unless it is empty, allways create a copy.
Bug: b/401546693
Change-Id: I9ea50d23c365ea59e1f6ae5e13a02048daa8b5f8
Files:
- M
src/resourceshrinker/java/com/android/build/shrinker/r8integration/LegacyResourceShrinker.java
- M
src/test/java/com/android/tools/r8/androidresources/DuplicatedEntriesEmptyUnusedTest.java
Hash: 5e687ec23a4cdb897cbd2cdccc75ff956d99c88c
Date: Tue Mar 11 10:54:12 2025
ms...@google.com <ms...@google.com> #9
Project: r8
Branch: 8.9
Author: Rico Wind <
Link:
Version 8.9.32
Expand for full commit details
Version 8.9.32
Bug: b/401546693
Change-Id: Ibed0928d2ac5c2b649516ce2a4918ad04da0b0e7
Files:
- M
src/main/java/com/android/tools/r8/Version.java
Hash: 3daff1971b739cc421cbc79ff63f8e54cf3ae2ed
Date: Tue Mar 11 10:54:18 2025
bi...@gmail.com <bi...@gmail.com> #10
[Deleted User] <[Deleted User]> #11
Project: r8
Branch: 8.10
Author: Rico Wind <
Link:
Version 8.10.17
Expand for full commit details
Version 8.10.17
Bug: b/401546693
Change-Id: I0f46c848db5653a9a7728f6f38ab305ac1dac80d
Files:
- M
src/main/java/com/android/tools/r8/Version.java
Hash: 5cb0d6c73b79a70b23b4717529431e18e2501c7a
Date: Tue Mar 11 10:53:16 2025
ms...@google.com <ms...@google.com> #12
Project: r8
Branch: 8.10
Author: Rico Wind <
Link:
Add reproduction of adding to immutable list in resource shrinker
Expand for full commit details
Add reproduction of adding to immutable list in resource shrinker
This happens if the list returned from the model is empty, in which case it is immutable
Bug: b/401546693
Change-Id: Ib596242df6e3299f19ff00a03dbe43bde79e13c0
Files:
- A
src/test/java/com/android/tools/r8/androidresources/DuplicatedEntriesEmptyUnusedTest.java
Hash: 3867edebfc19c949d55427b1f1774ba25539646e
Date: Tue Mar 11 10:53:02 2025
lo...@gmail.com <lo...@gmail.com> #13
Project: r8
Branch: 8.10
Author: Rico Wind <
Link:
Fix usage of Immutable list in resource shrinker
Expand for full commit details
Fix usage of Immutable list in resource shrinker
The returned list is mutable unless it is empty, allways create a copy.
Bug: b/401546693
Change-Id: I9ea50d23c365ea59e1f6ae5e13a02048daa8b5f8
Files:
- M
src/resourceshrinker/java/com/android/build/shrinker/r8integration/LegacyResourceShrinker.java
- M
src/test/java/com/android/tools/r8/androidresources/DuplicatedEntriesEmptyUnusedTest.java
Hash: d3cabf6667451e51d1d2edec5443ecaaadfbea01
Date: Tue Mar 11 10:53:09 2025
ms...@google.com <ms...@google.com> #14
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Meerkat Feature Drop | 2024.3.2 Beta 1
- Android Gradle Plugin 8.10.0-beta01
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
ms...@google.com <ms...@google.com> #15
The fixes for this issue are now also available in:
- Android Studio Meerkat | 2024.3.1 Patch 1
- Android Gradle Plugin 8.9.1
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
lo...@gmail.com <lo...@gmail.com> #16
Thanks very much for the regular updates. I just tried it out and it works for me.
Description
Hardware:
2021 Macbook Pro with M1Max
Component used:
Android AVD Manager
Devices/Android versions reproduced on:
Android Studio Arctic Fox | 2020.3.1 Patch 3
Build #AI-203.7717.56.2031.7784292, built on October 1, 2021
Runtime version: 11.0.10+0-b96-7249189 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.0.1
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 10
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: com.thoughtworks.gauge, org.jetbrains.kotlin, org.intellij.plugins.markdown