你好,我在将Android Studio升级到Android 3.3.2时遇到了问题。当我打开旧项目时,它正在同步,最后给我这样的错误:
ERROR: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.0 and higher.
The following dependencies do not satisfy the required version:
root project 'BreatherApp' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71
Affected Modules: app
ERROR: Failed to resolve: org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.30
Show in Project Structure dialog
Affected Modules: app
build.gradle
buildscript {
ext.kotlin_version = '1.3.11'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.11"
// 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
}
请帮助我,我有要做的事情,但仍然无法正常工作。...
答案 0 :(得分:1)
错误日志已经告诉您:
Android Gradle插件仅支持 1.3.0 及更高版本的Kotlin Gradle插件
但是你有
根项目'BreatherApp'-> org.jetbrains.kotlin:kotlin-gradle-plugin: 1.2.71
然后,您只需要将您的Kotlin版本(build.gradle
“ BreatherApp”模块内的一行)更新为1.3.0
或更高版本。
错误日志已经告诉您:
无法解决:org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.30
有is no 1.3.30
of kotlin-stdlib-jdk7
,但有1.3.30-dev-xxxx
and 1.3.30-eap-xx
的列表。选择所需的版本(也许以1.3.11
为根,build.gradle
说),编辑模块 build.gradle
。
更新:请阐明项目 build.gradle
和模块 build.gradle