15

After upgrading to Android Studio Giraffe I switched from gradle 8.0.2 to 8.1.0 as recommended. It seems to be working fine when building from Android Studio on Windows 11 but it broke my GitHub builds.

Here is the error apparently:

ERROR: /home/runner/work/Fulguris/Fulguris/app/build/intermediates/merged_java_res/slionsFullDownloadRelease/base.jar: R8: com.android.tools.r8.ResourceException: com.android.tools.r8.internal.Tb: I/O exception while reading '/home/runner/work/Fulguris/Fulguris/app/build/intermediates/merged_java_res/slionsFullDownloadRelease/base.jar': /home/runner/work/Fulguris/Fulguris/app/build/intermediates/merged_java_res/slionsFullDownloadRelease/base.jar

Not exactly obvious what that is…

1 Answer 1

21

See https://issuetracker.google.com/277166577#comment6 for the resolution of this issue.

To fix it just replace whenTaskAdded by configureEach in your gradle file.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks! I'm guessing if I had attempted a release build from Android Studio it would have failed too.
This fixed it for me. Can I ask - how the HELL would we ever figure this out? This is absolutely unacceptable conditions for a development environment. We deserve better.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.