无法加载类 org.gradle.api.internal.component.Usage解决办法

在Androidstudio编译发生如下错误

Error:A problem occurred configuring project ':image-preview'.

> Exception thrown while executing model rule: PublishingPlugin.Rules#publishing(ExtensionContainer)

   > org/gradle/api/internal/component/Usage

或者

Error:Unable toload class 'org.gradle.api.internal.component.Usage'.


解决办法:

1、在项目根目录 build.gradle修改一下bintray-release的版本,最新的版本可以在github上找到链接


2、bintray-release是向maven和bintray库发布的工具,用于Android库项目、普通Java和普通的Groovy项目中,目前主要支持Android项目。如果不需要更新项目可以在项目根目录和module目录下的 build.gradle 中注释

classpath'com.novoda:bintray-release:0.5.0' 和 apply plugin:'com.novoda.bintray-release' 和相关内容


猜你喜欢

转载自blog.csdn.net/u010042669/article/details/79712112
今日推荐