我的 Android Studio 要求我将 gradle 升级到 3.5.1 版本,但是一旦我这样做了,它就再也无法同步了,尽管我没有报告任何明显的错误...
唯一出现的错误消息是“Gradle 项目同步失败。基本功能(例如编辑、调试)将无法正常工作。”
22:32 Gradle 同步失败:org/jetbrains/plugins/gradle/util/GradleConstants 请参考 IDE 日志以获取更多详细信息(帮助 | 显示日志)(18 秒 224 毫秒)
已经尝试过清除项目、重建以及使其无效 / 重新启动,但都没有用。
有谁能帮帮我吗?
我的构建脚本:
buildscript {
ext.kotlin_version = '1.3.50'
ext.anko_version='0.10.8'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// 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
}
以下是我“idea.log”文件的最新记录
2019-10-03 22:32:41,266 [e-1483-b03] INFO - rationStore.ComponentStoreImpl - Saving Project 'C:\Users\mathe\Pictures\Design\ANDROID\ResistCalc' ResistCalcProjectCodeStyleConfiguration took 40 ms
2019-10-03 22:32:41,266 [Alarm Pool] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 163 ms
2019-10-03 22:32:46,056 [e-1483-b03] WARN - un.AndroidRunConfigurationBase - Can't get application ID: Android module missing
2019-10-03 22:32:46,056 [e-1483-b03] WARN - un.AndroidRunConfigurationBase - Can't get application ID: Android module missing
2019-10-03 22:32:46,056 [e-1483-b03] WARN - un.AndroidRunConfigurationBase - Can't get application ID: Android module missing
2019-10-03 22:32:46,056 [e-1483-b03] WARN - un.AndroidRunConfigurationBase - Can't get application ID: Android module missing