突然间我开始收到这个错误,我不明白为什么如果有人让我知道这个错误在哪里,就会有足够的帮助。由于 android studio 的新更新,我能得到的就是这个。我得到的错误的详细摘要。
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.
* What went wrong:
Execution failed for task ':app:kaptDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
> java.lang.reflect.InvocationTargetException (no error message)
* 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.
* Get more help at https://help.gradle.org
BUILD FAILED in 17s
29 actionable tasks: 27 executed, 2 up-to-date
原文由 Shubham Tater 发布,翻译遵循 CC BY-SA 4.0 许可协议
这个答案对于那些在同一台机器上从一个帐户(用户)切换到另一个用户(WINDOWS 操作系统)的人很有用
我遇到了类似的问题
但原因是以下文件的权限被拒绝
问题场景
我所做的是,将 C:\Android.gradle\ 从我以前的机器复制到新机器。我在新机器上使用的用户帐户是 X。我创建了一个新帐户,然后删除了帐户 X。
由于 X 是所有者,因此新帐户存在权限问题。
解决方案是更改所有权或删除 C:\Android.gradle\ 并让 Android Studio(AS) 下载相同的内容。出于同样的原因,我在提交时也面临所有权问题。为了避免任何进一步的问题,我删除
C:\Android
(其中包括.gradle, .android, C:\Android\Local\Android\Sdk
文件夹)重新安装了 Android Studio。git 子模块更新失败,出现“致命:在存储库中检测到可疑所有权”