In my android studio build gradle is failed i dont know how so then i check the log and i saw this error Error:Could not find method compile() for arguments [com.android.support:recyclerview-v7:25.3.1] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Please install the Android Support Repository from the Android SDK Manager. Open Android SDK Manager
then i check it but android support respository is already installed version 47.0.0 i restart android studio but it shows same error how i solve this error from android studio please help me to solve this problem?
This could be a side effect of a missing plugin. ācompileā is added by the a Java or a Android plugin. Can you check which plugins are applied in your build? (Note: instead of compile, you should use āimplementationā or āapiā)
Which plugins do you apply using apply plugin: .... Can you share that part of your build script? Make sure you apply the plugins in the beginning before the dependencies block. E.g.:
A problem occurred evaluating root project āvideo-game-databaseā.
Could not find method compile() for arguments [org.springframework.boot:spring-boot-starter-web, org.springframework.boot:spring-boot-starter-jersey, org.springframework.boot:spring-boot-starter-jdbc, com.h2database:h2:1.4.+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Bold is line 24 in my build.gradle. Can you please help me with this?
Maybe the issue is that you upgraded to Gradle 7, which deprecated the Java pluginās compile , runtime , testCompile , and testRuntime configurations? You should use implementation , runtimeOnly , testImplementation , and testRuntimeOnly instead, also see this answer on StackOverflow.