Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android r8 Error: java.util.ConcurrentModificationException #9861

Open
Pmr-precure opened this issue Feb 28, 2025 · 1 comment
Open

Android r8 Error: java.util.ConcurrentModificationException #9861

Pmr-precure opened this issue Feb 28, 2025 · 1 comment
Assignees
Labels
Area: App+Library Build Issues when building Library projects or Application projects.

Comments

@Pmr-precure
Copy link

Description

Hi,

After we updated to 9.0.40, we are getting this error when trying to build a release version for Android.

Image

I happens when r8 is enabled and in our config file we keep this:

-keep class com.google.crypto.tink.** { *; } (Tbh i cant remember why we added this, but it was for sure to fix other bugs)

This prevents us from building.

If we remove this:

-keep class com.google.crypto.tink.** { *; }

Then it builds just fine. No idea why this could be to be honest.

BR.

Steps to Reproduce

  1. clone repo.
  2. Build a release build
  3. observe error.
  4. remove # -keep class com.google.crypto.tink.** { *; } in proguard.cfg.
  5. delete bin and obj folder.
  6. Build release version.
  7. Success.

Link to public reproduction project repository

https://github.com/Pmr-precure/MauiTestProject/tree/r8_bug

Version with bug

9.0.40 SR4

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.30 SR3

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

Only by removing -keep class com.google.crypto.tink.** { *; }

Relevant log output

@jfversluis jfversluis transferred this issue from dotnet/maui Feb 28, 2025
@dotnet-policy-service dotnet-policy-service bot added the needs-triage Issues that need to be assigned. label Feb 28, 2025
@jpobst jpobst added Area: App+Library Build Issues when building Library projects or Application projects. and removed needs-triage Issues that need to be assigned. t/bug labels Feb 28, 2025
@jonathanpeppers
Copy link
Member

This kind of just looks like an internal bug in r8.jar; this is from Android and we just redistribute it:

implementation 'com.android.tools:r8:8.5.35'

We have a newer r8 version in .NET 10, so I wonder if the problem goes away there?

implementation 'com.android.tools:r8:8.7.18'

@jonathanpeppers jonathanpeppers added this to the Under Consideration milestone Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: App+Library Build Issues when building Library projects or Application projects.
Projects
None yet
Development

No branches or pull requests

4 participants