Gradle crashes with: Hilt + AGP 4.2.0-beta04
See original GitHub issueVersions: Hilt 2.31.2-alpha AGP 4.2.0-beta04 Gradle 6.8.1
Partial stacktrace:
FAILURE: Build failed with an exception.
* What went wrong:
com.android.build.api.extension.AndroidComponentsExtension$DefaultImpls.androidTest$default(Lcom/android/build/api/extension/AndroidComponentsExtension;Lcom/android/build/api/extension/VariantSelector;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
java.lang.NoSuchMethodError: com.android.build.api.extension.AndroidComponentsExtension$DefaultImpls.androidTest$default(Lcom/android/build/api/extension/AndroidComponentsExtension;Lcom/android/build/api/extension/VariantSelector;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
at dagger.hilt.android.plugin.HiltGradlePlugin.configureTransformASM(HiltGradlePlugin.kt:224)
at dagger.hilt.android.plugin.HiltGradlePlugin.configureHilt(HiltGradlePlugin.kt:74)
at dagger.hilt.android.plugin.HiltGradlePlugin.access$configureHilt(HiltGradlePlugin.kt:47)
at dagger.hilt.android.plugin.HiltGradlePlugin$apply$1.execute(HiltGradlePlugin.kt:52)
at dagger.hilt.android.plugin.HiltGradlePlugin$apply$1.execute(HiltGradlePlugin.kt:47)
at org.gradle.configuration.internal.DefaultUserCodeApplicationContext$CurrentApplication$1.execute(DefaultUserCodeApplicationContext.java:100)
at org.gradle.api.internal.DefaultCollectionCallbackActionDecorator$BuildOperationEmittingAction$1.run(DefaultCollectionCallbackActionDecorator.java:95)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:35
- Comments:15 (2 by maintainers)
Top Results From Across the Web
When adding hilt dependency the realm database crashes
After I added hilt dependencies in the gradle the app crashes and it happens while performing operation on realm database. I am using...
Read more >Known issues with Android Studio and Android Gradle Plugin
Starting with version 4.2, Android Studio now runs on JDK 11. ... Apps using the Database Inspector may crash when running on the...
Read more >Gradle Build Setup - Dagger
When the Android Gradle plugin (AGP) version used in the project is less than 4.2, then the Hilt Gradle plugin by default, will...
Read more >com.android.tools.build:gradle:4.2.0 broke manifest ...
We have the same issue with manifestPlaceholders after upgrading to AGP 4.2.1. The same gradle config works in 4.1.2 and fails in 4.2.1...
Read more >AGP 7.0: Next major release for the Android Gradle plugin
In fact, in AGP 4.2 some of these APIs have changed. The APIs that are currently incubating do not follow the deprecation cycle...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
2.35.1
worked oncom.android.tools.build:gradle:7.0.0-beta02
,2.36
works oncom.android.tools.build:gradle:7.0.0-beta03
using AGP
7.0.0-beta04
and Hilt2.37
, the same issue seems to persist…