# Could not find method compile() for arguments \[com.android.support:recyclerview-v7:25.3.1\] 

**URL:** <https://discuss.gradle.org/t/could-not-find-method-compile-for-arguments-com-android-support25-3-1/34566>\
**Category:** Help/Discuss\
**Created:** [January 16, 2020, 5:18pm UTC](https://discuss.gradle.org/t/could-not-find-method-compile-for-arguments-com-android-support25-3-1/34566 "2020-01-16T17:18:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![palash](https://avatars.discourse-cdn.com/v4/letter/p/cdc98d/32.png) [@palash](https://discuss.gradle.org/u/palash)\
**Post date:** [January 16, 2020, 5:18pm UTC](https://discuss.gradle.org/t/could-not-find-method-compile-for-arguments-com-android-support25-3-1/34566/1 "2020-01-16T17:18:06Z")

</div>

hi,

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?

---

<div class="post-metadata">

**Author:** ![jendrik](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/jendrik/32/7964_2.png) [@jendrik](https://discuss.gradle.org/u/jendrik)\
**Post date:** [January 24, 2020, 7:52am UTC](https://discuss.gradle.org/t/could-not-find-method-compile-for-arguments-com-android-support25-3-1/34566/2 "2020-01-24T07:52:45Z")

</div>

Hi @palash,

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”)

---

<div class="post-metadata">

**Author:** ![palash](https://avatars.discourse-cdn.com/v4/letter/p/cdc98d/32.png) [@palash](https://discuss.gradle.org/u/palash)\
**Post date:** [January 24, 2020, 8:11am UTC](https://discuss.gradle.org/t/could-not-find-method-compile-for-arguments-com-android-support25-3-1/34566/3 "2020-01-24T08:11:49Z")

</div>

Hi jendrik,  
thank you for you reply on your busy time, i see and my doubt on this line below i mention it on project gradle

```
       compile "com.android.support:recyclerview-v7:25.3.1"
       compile "com.android.support:recyclerview-v7:27.1.1"

```

what i do now?

---

<div class="post-metadata">

**Author:** ![jendrik](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/jendrik/32/7964_2.png) [@jendrik](https://discuss.gradle.org/u/jendrik)\
**Post date:** [January 24, 2020, 8:29am UTC](https://discuss.gradle.org/t/could-not-find-method-compile-for-arguments-com-android-support25-3-1/34566/4 "2020-01-24T08:29:10Z")

</div>

Which plugins do you apply in your build?

```gradle
plugins {
    ..
}

```

Or

```gradle
apply plugin: ...

```

---

<div class="post-metadata">

**Author:** ![palash](https://avatars.discourse-cdn.com/v4/letter/p/cdc98d/32.png) [@palash](https://discuss.gradle.org/u/palash)\
**Post date:** [January 24, 2020, 10:23am UTC](https://discuss.gradle.org/t/could-not-find-method-compile-for-arguments-com-android-support25-3-1/34566/5 "2020-01-24T10:23:19Z")

</div>

on my project\>build gradle\>  
i used apply plugin: on my gradle.

---

<div class="post-metadata">

**Author:** ![palash](https://avatars.discourse-cdn.com/v4/letter/p/cdc98d/32.png) [@palash](https://discuss.gradle.org/u/palash)\
**Post date:** [January 26, 2020, 7:16am UTC](https://discuss.gradle.org/t/could-not-find-method-compile-for-arguments-com-android-support25-3-1/34566/6 "2020-01-26T07:16:55Z")

</div>

so what do next ???

---

<div class="post-metadata">

**Author:** ![jendrik](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/jendrik/32/7964_2.png) [@jendrik](https://discuss.gradle.org/u/jendrik)\
**Post date:** [January 27, 2020, 12:34pm UTC](https://discuss.gradle.org/t/could-not-find-method-compile-for-arguments-com-android-support25-3-1/34566/7 "2020-01-27T12:34:21Z")

</div>

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.:

```gradle
apply plugin: "com.android.application"

...

dependencies {
       compile "com.android.support:recyclerview-v7:27.1.1"
}

```

---

<div class="post-metadata">

**Author:** ![palash](https://avatars.discourse-cdn.com/v4/letter/p/cdc98d/32.png) [@palash](https://discuss.gradle.org/u/palash)\
**Post date:** [January 27, 2020, 1:38pm UTC](https://discuss.gradle.org/t/could-not-find-method-compile-for-arguments-com-android-support25-3-1/34566/8 "2020-01-27T13:38:22Z")

</div>

hi jendrik,  
good to see you,no problem to share a code but i am here hesitate to share code so can i share my code on mail or github?

---

<div class="post-metadata">

**Author:** ![amuddeshwar](https://avatars.discourse-cdn.com/v4/letter/a/8c91f0/32.png) [@amuddeshwar](https://discuss.gradle.org/u/amuddeshwar)\
**Post date:** [August 22, 2021, 6:40am UTC](https://discuss.gradle.org/t/could-not-find-method-compile-for-arguments-com-android-support25-3-1/34566/9 "2021-08-22T06:40:06Z")

</div>

Hi Jendrik,

Hope you are doing well. I’m applying below plugins and my dependencies are below plugins:

apply plugin: ‘java’  
apply plugin: ‘idea’  
apply plugin: ‘eclipse’  
apply plugin: ‘org.springframework.boot’  
apply plugin: ‘io.spring.dependency-management’

repositories {  
mavenCentral()  
}

dependencies {  
compile ‘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.+’**

```
compile 'io.swagger:swagger-jersey2-jaxrs:1.5.10'

compile 'javax.xml.bind:jaxb-api',
        'com.sun.xml.bind:jaxb-core:2.3.0.1',
        'com.sun.xml.bind:jaxb-impl:2.3.0.1',
        'javax.activation:activation:1.1.1'

```

However, I’m still receiving an error here:

- Where:

Build file ‘/Users/ameymuddeshwar/Downloads/VideoGameDB-master/build.gradle’ line: 24

- What went wrong:

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?

---

<div class="post-metadata">

**Author:** ![Sebastian\_Schuberth](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/sebastian_schuberth/32/185_2.png) [@Sebastian\_Schuberth](https://discuss.gradle.org/u/Sebastian_Schuberth)\
**Post date:** [January 9, 2022, 10:55am UTC](https://discuss.gradle.org/t/could-not-find-method-compile-for-arguments-com-android-support25-3-1/34566/10 "2022-01-09T10:55:10Z")

</div>

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](https://stackoverflow.com/a/66910991/1127485).
