Could not find method implementation() for arguments [com.android.support:appcompat-v7:25.4.0] on object…android

后端 未结 4 1586
栀梦
栀梦 2021-01-14 04:40

I have to compile a project purchased on line. On importing it into android studio..it complained about the gradle version so i updated the distributionUrl to this dis

4条回答
  •  忘掉有多难
    2021-01-14 05:33

    To use implementation() you need to use gradle v.4 and the gradle plugin v.3

    Use:

    distributionUrl=\
      https\://services.gradle.org/distributions/gradle-4.1-all.zip
    

    and

    buildscript {
        repositories {
            ...
            // You need to add the following repository to download the
            // new plugin.
            maven {
                url "https://maven.google.com"
            }            
            //google()  //only if you use Android Studio 3.x
        }
    
        dependencies {
            classpath 'com.android.tools.build:gradle:3.0.0-beta7'
        }
    }
    

    More info here.

提交回复
热议问题