解决Studio升级产生的bug:No such property: FOR_RUNTIME for class: org.gradle.api.attributes.Usage

我导入一个别人的产生这个问题,上网查看到一篇不错的解决方案,传送带,我也在这总结一下。

导致问题产生的原因,是因为项目中有使用了bintray-release ,把相应引用的代码注释掉就能正常编译通过了。

以下是有关注释的代码段:

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'
//        classpath 'com.novoda:bintray-release:0.5.0'
    }
    // NOTE: Do not place your application dependencies here; they belong 
    // in the individual module build.gradle files
}
//apply plugin: 'com.novoda.bintray-release'//添加JCenter插件

//publish {
//    userOrg = 'contrarywind'//bintray.com 用户名/组织名 user/org name
//    groupId = 'com.contrarywind'//JCenter上显示的路径 path
//    artifactId = 'Android-PickerView'//项目名称 project name
//    publishVersion = '4.1.6'//版本号 version code
//    desc = 'this is a pickerview for android'//项目描述 description
//    website = 'https://github.com/Bigkoo/Android-PickerView' //项目网址链接 link
//}

注意:所有Module里的有关bintray-release 都注释掉。

猜你喜欢

转载自blog.csdn.net/qq_40441190/article/details/83149896
今日推荐