Android Studio 3.0升级之后导入github项目报错

版权声明:本文为博主原创文章,未经博主允许不得转载。若转载请注明出处 https://blog.csdn.net/qq_26761229/article/details/79813685

1.Unable to load class ‘org.gradle.api.internal.component.Usage’.

解决办法:项目根目录的 build.gradle 中 修改如下代码:

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        ...
        classpath 'com.novoda:bintray-release:0.5.0'//修改此处版本号为 0.5.0---修改之前是0.3.4
        ...
    }
}

2.Error:Unable to find method ‘com.android.build.gradle.internal.variant.BaseVariantData.getOutputs()

buildscript {
    ext.kotlin_version = '1.1.2-3'
    repositories {
        maven { url 'https://maven.google.com' }
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0-alpha1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

将1.1.2-3’ -> ‘1.1.2-4’

猜你喜欢

转载自blog.csdn.net/qq_26761229/article/details/79813685