尝试将项目上传到 bintray
并出现错误:
Could not determine java version from '9.0.1'.
我读到它是等级错误并在较高版本中修复,我尝试将 gradle
版本更改为 4.2.1
,但出现另一个错误:
Gradle 同步失败:没有此类属性:类的 FOR_RUNTIME:org.gradle.api.attributes.Usage 有关更多详细信息,请查阅 IDE 日志(帮助 | 显示日志)(571 毫秒)
摇篮属性:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-all.zip
构建gradle项目
buildscript {
ext.kotlin_version = '1.1.51'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-beta7'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
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
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
原文由 no news 发布,翻译遵循 CC BY-SA 4.0 许可协议
您还应该删除 Java JDK。只需运行以下命令:
现在检查在您的终端中输入“java”。
有关更多参考,您可以在此处查看: https ://www.howtogeek.com/230145/how-to-uninstall-java-on-mac-os-x/