-
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
Gradle crashes with: Hilt + AGP 4.2.0-beta04 #2337
Comments
Looks like the methods got renamed between |
Fun fact: this doesn't happen with AGP 7.0.0-alpha05 (which was released
just one day earlier ).
…On Fri, Jan 29, 2021, 17:21 Daniel Santiago ***@***.***> wrote:
Looks like the methods got renamed between beta03 and beta04
<https://cs.android.com/android-studio/platform/tools/base/+/25384edea39fc22fc03097fb2e80908bf61b94d1>.
We'll need to update Hilt's plugin to fix this. Sorry for the inconvenience.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2337 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJW2JEDSX34N5Q25JJXATTS4LN7ZANCNFSM4WYPQZ3Q>
.
|
It happened to me after upgrading Android Studio to 4.2.0. Updating the hilt classpath on build.gradle to 2.35 fixed these issues for me.
|
Using a combination of Hilt version 2.35 worked for me |
Please make sure that your hilt version will be same in project level and module level gradle.
|
I got the same error with Android Studio Bumblebee | 2021.1.1 Canary 1 |
Same issue encountered in jetpack compose project using:
Android Studio Bumblebee | 2021.1.1 Canary 1 UPDATEby using HEAD-SNAPSHOT the problem is fixed for now (as mentioned here -> #2631)
|
The problem seems to still exist, the head-snapshot solution by @michal-th did not work either |
|
|
using AGP |
@k4biri you are seeing a different but similar issue: #2700 |
Changing to |
I solved it with the following gradle settings.
app/build.gradle dependencies {
implementation "com.google.dagger:hilt-android:2.37"
kapt "com.google.dagger:hilt-android-compiler:2.37"
implementation "androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha03"
kapt "androidx.hilt:hilt-compiler:1.0.0"
implementation 'androidx.hilt:hilt-navigation-compose:1.0.0-alpha03'
} ROOT/build.gradle dependencies {
classpath "com.android.tools.build:gradle:7.0.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
classpath "com.google.dagger:hilt-android-gradle-plugin:2.37"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
} |
So is AGP 7 a requirement for Hilt stable to work? |
Versions:
Hilt 2.31.2-alpha
AGP 4.2.0-beta04
Gradle 6.8.1
Partial stacktrace:
The text was updated successfully, but these errors were encountered: