执行org.jetbrains.kotlin.gradle.internal.KaptExecution时发生故障 [英] A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
问题描述
突然间,我开始收到此错误,并且我不知道为什么如果有人让我知道此错误在哪里,将足够有帮助.由于android studio的新更新,我能得到的就是这个. 我得到的错误的详细摘要.
All of sudden I start getting this error, and I am not getting idea why if anyone just let me know where this error is, will be enough helpful. As much I am able to get is this because of new update of android studio. Detailed summary of error I am getting.
Task :app:kaptDebugKotlin
ANTLR Tool version 4.5.3 used for code generation does not match the current runtime version 4.7.1ANTLR Runtime version 4.5.3 used for parser compilation does not match the current runtime version 4.7.1ANTLR Tool version 4.5.3 used for code generation does not match the current runtime version 4.7.1ANTLR Runtime version 4.5.3 used for parser compilation does not match the current runtime version 4.7.1C:\Users\shubh\Downloads\MarginCalculator\app\build\generated\source\kapt\debug\com\kotlin_developer\margincalculator\DataBinderMapperImpl.java:10: error: cannot find symbol
import com.kotlin_developer.margincalculator.databinding.FragmentCalculatorScreenBindingImpl;
symbol: class FragmentCalculatorScreenBindingImpl
Task :app:kaptDebugKotlin FAILED
location: package com.kotlin_developer.margincalculator.databinding
FAILURE: Build failed with an exception.
-
出了什么问题: 任务':app:kaptDebugKotlin'的执行失败.
What went wrong: Execution failed for task ':app:kaptDebugKotlin'.
执行org.jetbrains.kotlin.gradle.internal.KaptExecution时发生故障 java.lang.reflect.InvocationTargetException(无错误消息)
A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution java.lang.reflect.InvocationTargetException (no error message)
-
尝试: 使用--stacktrace选项运行以获取堆栈跟踪.使用--info或--debug选项运行,以获取更多日志输出.与--scan一起运行以获得完整的见解.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
17秒内失败 29个可执行任务:27个已执行,2个最新
BUILD FAILED in 17s 29 actionable tasks: 27 executed, 2 up-to-date
推荐答案
也许我的答案有点晚了,但是无论如何,我遇到了同样的错误.构建失败可能是由Android Studio未能指出的一些错误引起的,可能是由于项目规模很大.
Maybe I am a bit late for the answer but, anyways, I was getting the same error. The build failure can be caused by some error that Android Studio fails to point out probably due the the project size being very large.
这是指出确切错误的简便方法.
Here is the easy way to point out the exact error.
-
在Android Studio中,转到"分析"菜单,然后单击"检查代码" ;检查整个项目,单击确定",然后等待检查完成.
In Android studio go to Analyze menu and click on Inspect Code; check whole project, click OK and wait for the inspection to finish.
现在您将看到一个标签,其中包含所有错误,警告等,您现在可以解决实际问题.
Now you will see a tab that will point all the errors, warnings etc and you can now resolve the real issue.
这篇关于执行org.jetbrains.kotlin.gradle.internal.KaptExecution时发生故障的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
-