Gradle error when Update to Android studio 3.2

為{幸葍}努か 提交于 2019-12-06 22:05:40

问题


I updated my Android Studio version to 3.2. Now I am facing following error for my project - com.novoda.gradle.release.AndroidLibrary$LibraryUsage.getDependencyConstraints()Ljava/util/Set;

Currently I am using gradle version 4.6. Issue link https://github.com/novoda/bintray-release/issues/177 says to downgrade gradle version to 4.4 but minimum supported version for Android Studio 3.2 is 4.6.

How to resolve this error.


回答1:


I solved the same error by changing the order of the plugins in your build.gradle file to :

//has to be BEFORE 'com.android.library'
apply plugin: 'com.novoda.bintray-release' 
apply plugin: 'com.android.library'

The solution is stated here - Take a look at : Issue III.

While keeping the distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip in my gradle-wrapper.properties file.




回答2:


This solution worked for me: As Bintray has fixed the issue in its new release i.e. 0.9 so adding that in build.gradle (project) files removes the error.

classpath 'com.novoda:bintray-release:0.9'




回答3:


You will either need to downgrade back to AS 3.1.x or attempt the workarounds described on the Novoda issue you linked. Namely this plugin...



来源:https://stackoverflow.com/questions/52495168/gradle-error-when-update-to-android-studio-3-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!