Reputation: 5452
I am trying to build a Jetpack Compose project with Android Studio Arctic Fox (2020.3.1) Beta 3, and the build fails with the following error.
Unable to find method ''void com.android.build.api.extension.AndroidComponentsExtension$DefaultImpls.androidTests$default(com.android.build.api.extension.AndroidComponentsExtension, com.android.build.api.extension.VariantSelector, kotlin.jvm.functions.Function1, int, java.lang.Object)''
'void com.android.build.api.extension.AndroidComponentsExtension$DefaultImpls.androidTests$default(com.android.build.api.extension.AndroidComponentsExtension, com.android.build.api.extension.VariantSelector, kotlin.jvm.functions.Function1, int, java.lang.Object)'
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
I did everything I could, including invalidating caches, re-starting, trying different Gradle versions etc., but nothing has worked so far.
The project uses the default JDK 11 and Gradle, which comes with the installation.
Has anyone experienced a similar issue and knows how to solve it?
Any help would be appreciated.
Upvotes: 5
Views: 2823
Reputation: 6863
Could be project specific. Try making a new one to check if it is a universal problem in all projects. Also, if you haven't already, switch to the latest Bumblebee version of Canary.
Upvotes: 0
Reputation: 5452
When I update Hilt dependency to 2.28-alpha and Hilt Compiler dependency to 2.33-beta, the problem was solved. This happened after I updated Arctic Fox. It seems that different Arctic Fox versions require different Hilt configuration.
Upvotes: 2