Gradle - Error Could not find method implementation() for arguments [com.android.support:appcompat-v7:26.0.0]

后端 未结 11 1361
醉话见心
醉话见心 2020-12-08 03:39

I am trying to open existing android project in android studio and it gradle cannot build the app without the error

Error android studio keeps on throwing

         


        
相关标签:
11条回答
  • 2020-12-08 04:23

    I moved implementation to module-level build.gradle from root-level build.gradle. It solves the issue.

    0 讨论(0)
  • 2020-12-08 04:24

    If implementation is not defined, you are writing on a wrong file. On Unity 2019+ the correct file is main template grandle and not some of the others.

    0 讨论(0)
  • 2020-12-08 04:25

    Make sure you're adding these dependencies in android/app/build.gradle, not android/build.gradle

    0 讨论(0)
  • 2020-12-08 04:28

    Replace implementation with compile.

    compile was recently deprecated and replaced by implementation or api

    0 讨论(0)
  • 2020-12-08 04:29

    Your Code

    dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
    

    Replace it By

    dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    
    0 讨论(0)
提交回复
热议问题