I'm exploring the root cause, but after I upgraded...
# compose-desktop
c
I'm exploring the root cause, but after I upgraded to
org.jetbrains.compose:compose-gradle-plugin:1.0.1-rc2
I now get a crash in release mode (aka R8 enabled) of
Copy code
java.lang.IllegalAccessError: Method 'void android.view.View.onAnimationEnd()' implementing interface method 'void coil.target.Target.onAnimationEnd()' is not public (declaration of 'androidx.compose.ui.platform.AndroidComposeView'
Anyone else encounter this by chance or know where would be the right place to file. Not sure if it's agp/r8/c4d/coil.
t
What version of R8 are you using? Should be fixed in 3.1.33
c
I don't know what version of R8 I'm using as it's bundled with AGP I thought? Do you know how to specify a version? If so, I'll try that.
t
In your top level build.gradle add the following maven URL to the buildscript repositories:
Copy code
<https://storage.googleapis.com/r8-releases/raw>
Then in the same file add the following to the buildscript dependencies (add it BEFORE the Android gradle plugin):
Copy code
classpath("com.android.tools:r8:3.1.33")
You can see your current R8 version in the generated mapping file at the top somewhere
c
lmao
I commented on that issue.
back in october. I don't remember making the comment, but it looks like it was fixed, but broke again?
t
As far as I know it did not break again. Check your R8 version
Once you update to Android Gradle Plugin 7.1.0-beta04 (or higher) you can remove the R8 version workaround as that should contain the fix
c
I always use AGP alpha (as well as compose alpha/beta) and the issue definitely fixed itself because we have a commit that removed explicit r8 version declaration.
and now this started breaking again a few days ago.
so there was def some sort of regression/new issue
t
Hmm maybe a newer gradle plugin uses an older R8 version
c
ever since I moved to compose 1.1.0-rc02 (because of kotlin 1.6.10 support)
I'll keep investigating. My top priority for today is just getting a build that works. I should be able to play around with version combinations later today.
t
Can you check the generated mapping (of the bugged app) for the R8 version? That way you know for sure you are using the correct version
c
You can see your current R8 version in the generated mapping file at the top somewhere (edited)
Trying to find that. I never noticed it before. 1 sec
Bugged looks like: # compiler: R8 # compiler_version: 3.2.10-dev
t
It could be that version does not contain the fix
c
gotcha. alright. trying the versin you said 🤞
t
Looks like your version was released on 11 Oct so no fix
You can still use 3.2.x but use a newer one
For example I am using 3.2.22-dev
c
interesting. I guess I should also mention that I'm stuck on AAGP alpha 3 instead of 6 because 4,5,6 or agp introduced incompat with different plugins (named nav arg plugin)
so maybe AGP alpha6 uses something newer that would've had the fix.
t
The newest 3.2.x version is 3.2.35, you could try that one but I don’t know how stable it is
c
Fuck yeah. It worked! THANK YOU # compiler: R8 # compiler_version: 3.1.34
I'll stick with that version for now I suppose, until I can upgrade AGP, then I'll just piggyback with whatever AGP it ships. Unless you think I should just depend on a stable R8. /shruggie