英文:
After updating Android Studio Flamingo 2022.2.1 Patch 1, i got error Execution failed for task ':app:kaptDebugKotlin'
问题
I got error of "Execution failed for task ':app:kaptDebugKotlin'".
`Execution failed for task ':app:kaptDebugKotlin'.
A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction
java.lang.reflect.InvocationTargetException (no error message)`
My mac is intel so M1 is not the problem.
I tried so many suggestions on stack overflow. but i still can't find the answer,,,,
My gradle JDK is 17.0.6
== remove code that i have uploaded a part of gradle files ==
英文:
I got error of "Execution failed for task ':app:kaptDebugKotlin'"
Execution failed for task ':app:kaptDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction
> java.lang.reflect.InvocationTargetException (no error message)
My mac is intel so M1 is not the problem.
I tried so many suggestions on stack overflow. but i still can't find the answer,,,,
My gradle JDK is 17.0.6
== remove code that i have uploaded a part of gradle files ==
答案1
得分: 1
我的问题是Android Studio的JDK版本和我的Java版本不同•••
在升级Android Studio后,其JDK版本设置为JDK 17。但是,我的Java版本仍然是14.0.1。因此,我将它们都设置为相同的版本。
这就是为什么我陷入了构建错误中,太愚蠢了!
无论如何,希望有人能轻松解决这种问题!
在终端中检查:java -version
在Android Studio中检查JDK版本:设置 > 构建 > Gradle > 'Gradle JDK'
英文:
My problem was Android Studio JDK version and my Java version was different•••
after upgrading Android Studio, its JDK version sets to JDK 17. but, my Java version is still 14.0.1. So, I set both in the same version.
That's why i stuck in build error,,! so,, stupid,,,
anyway i hope someone to solve this kind of problem easily!
check in terminal : java -version
check the JDK version in Android Studio : settings > Build > Gradle > 'Gradle JDK'
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论