解决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 都注释掉。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值