-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Hilt plugin crash with android gradle plugin 7 beta04 #2700
Comments
The Android Gradle Plugin team is aware of the issue and a fix for this will be available in AGP 7 beta05. |
waiting for 7.0.0-beta05 google/dagger#2700
For people like me who need to downgrade, here is the link for the previous mac version (beta03) https://dl.google.com/edgedl/android/studio/ide-zips/2020.3.1.18/android-studio-2020.3.1.18-mac.zip |
@danysantiago is there an issue that we can follow to get updates on the progress? |
I think this will fix the issue |
@danysantiago is there timeline on the fix? |
Answer by @krzdabrowski on #2634 worked for me. |
Sorry all for the issue, AGP is expected to have a release sometime next week for 7.0-beta, if all goes well. Meanwhile using 7.1-alpha02 should work. And just for context, this is related to Hilt's bytecode transform which uses AGP's new ASM pipeline starting in 4.2 which is way more efficient and correct than the 'previous' version. The APIs for the ASM transform are planned to become stable soon in 7.0 so hopefully, in the near future this should be less of an issue. |
This change adds compatibility classes to support registering an ASM transform in AGP 4.2, 7.0 and 7.1. For 4.2 reflection has to be used for all invocations of the newer variant API since their package in 4.2 is different and its not possible to reference the classes when compiling against a newer version. For 7.0 an onwards, the API are stable and can be referenced directly. Fixes #2700 RELNOTES=Fix an incompatibility in the Hilt Gradle Plugin with AGP 7.0-beta04 and 7.1-alpha02, be aware that with this fix the HiltGradlePlugin will not work with other older alpha/beta versions of AGP 7.0 and 7.1 other than the ones mentioned in these notes. PiperOrigin-RevId: 380743576
AGP 7.0.0-beta05 has been released and seems to have fixed this :) |
This change adds compatibility classes to support registering an ASM transform in AGP 4.2, 7.0 and 7.1. For 4.2 reflection has to be used for all invocations of the newer variant API since their package in 4.2 is different and its not possible to reference the classes when compiling against a newer version. For 7.0 an onwards, the API are stable and can be referenced directly. Fixes #2700 RELNOTES=Fix an incompatibility in the Hilt Gradle Plugin with AGP 7.0-beta04 and 7.1-alpha03, be aware that with this fix the HiltGradlePlugin will not work with other older alpha/beta versions of AGP 7.0 and 7.1 other than the ones mentioned in these notes. PiperOrigin-RevId: 380743576
This change adds compatibility classes to support registering an ASM transform in AGP 4.2, 7.0 and 7.1. For 4.2 reflection has to be used for all invocations of the newer variant API since their package in 4.2 is different and its not possible to reference the classes when compiling against a newer version. For 7.0 an onwards, the API are stable and can be referenced directly. Fixes #2700 RELNOTES=Fix an incompatibility in the Hilt Gradle Plugin with AGP 7.0-beta04 and 7.1-alpha03, be aware that with this fix the HiltGradlePlugin will not work with other older alpha/beta versions of AGP 7.0 and 7.1 other than the ones mentioned in these notes. PiperOrigin-RevId: 380743576
Using AGP 7.1.0-alpha02 to workaround google/dagger#2700. Arctic Fox Beta 05 should solve the problem and we can go back to the less bleeding edge versions. Also updates * Kotlin to 1.5.10 * Coroutines to 1.5.0
Versions:
Android Studio Arctic Fox Beta 4
Android tools gradle plugin 7.0.0-beta04
kotlin gradle plugin 1.5.10
dagger 2.37
Gradle build fails when applying hilt plugin to the module:
Partial stacktrace
EDIT
If anyone needs a quick fix without downgrading AS it compiles without errors on alpha using Android Studio Bumblebee Canary 2 and AGP 7.1.0-alpha02.
The text was updated successfully, but these errors were encountered: