5

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.

Tartar
  • 5,149
  • 16
  • 63
  • 104
  • update all your implemented dependencies and make sure related dependencies have same version and don't forget to check build.gradle (project : AppName) dependencies. –  Jun 13 '21 at 04:58
  • I have same issue and try everything still not working – Rucha Bhatt Joshi Jul 15 '21 at 09:04

2 Answers2

2

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.

Tartar
  • 5,149
  • 16
  • 63
  • 104
0

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.

Richard Onslow Roper
  • 5,477
  • 2
  • 11
  • 42