将 android studio 更新到 4.2 后,我的项目遇到以下错误。
Execution failed for task ':common:kaptDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
> java.lang.reflect.InvocationTargetException (no error message)
我的 build.gradle 文件如
buildscript {
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.4'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
}
}
感谢任何建议。
答案 0 :(得分:1)
我升级到 4.2 版本后遇到了这个问题。
我尝试升级gradle版本
project#gradle-wrapper.properties -> 像下面一样改变 distributionUrl
distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-all.zip
同步项目。