philipplackner / JetpackComposePokedex

234 stars 143 forks source link

java.lang.NoSuchMethodError: com.android.build.api.extension.AndroidComponentsExtension$DefaultImpls #4

Open doulemint opened 2 years ago

doulemint commented 2 years ago

fail to sync this project

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) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29) at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71) at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71) at org.gradle.api.internal.DefaultCollectionCallbackActionDecorator$BuildOperationEmittingAction.execute(DefaultCollectionCallbackActionDecorator.java:92) at org.gradle.api.internal.collections.CollectionFilter$1.execute(CollectionFilter.java:59) at org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:163) at org.gradle.api.internal.DefaultDomainObjectCollection.withType(DefaultDomainObjectCollection.java:205) at dagger.hilt.android.plugin.HiltGradlePlugin.apply(HiltGradlePlugin.kt:50) at dagger.hilt.android.plugin.HiltGradlePlugin.apply(HiltGradlePlugin.kt:47)

Blindsurfer commented 2 years ago

Just change hilt to: classpath "com.google.dagger:hilt-android-gradle-plugin:2.38.1"