用于代码生成的ANTLR工具版本4.7.1与当前的运行时版本4.5.3不匹配 [英] ANTLR Tool version 4.7.1 used for code generation does not match the current runtime version 4.5.3
问题描述
我正在使用目前使用DSL和一些库的Android应用程序工作,突然,构建过程给了我这个错误.
Im working on an Android App, currently using DSL and some libraries, suddenly the build gave me this error.
任务:app:kaptDebugKotlin失败 用于代码生成的ANTLR工具4.7.1版本与当前运行时版本4.5.3不匹配用于分析器编译的ANTLR运行时4.7.1版本与当前运行时版本4.5.3不匹配 失败:构建失败,并出现异常.
Task :app:kaptDebugKotlin FAILED ANTLR Tool version 4.7.1 used for code generation does not match the current runtime version 4.5.3ANTLR Runtime version 4.7.1 used for parser compilation does not match the current runtime version 4.5.3 FAILURE: Build failed with an exception.
出了什么问题
任务':app:kaptDebugKotlin'的执行失败. 执行org.jetbrains.kotlin.gradle.internal.KaptExecution时发生故障 java.lang.reflect.InvocationTargetException(无错误消息)
Execution failed for task ':app:kaptDebugKotlin'. A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution java.lang.reflect.InvocationTargetException (no error message)
我一直在搜索,但没有成功...
i've been searching but with no success...
如果您想查看该问题,可以克隆该项目. GITHUB项目 我正在使用Android Studio Canary 4.1.
If you wanna see the issue you can clone the project. Project GITHUB Im using Android Studio Canary 4.1.
谢谢.
推荐答案
所以解决方案来自build.gradle
So the solution was from the build.gradle
基本上是从ROOM导入的
basically the import from ROOM was this
import(Room.compiler)
所以我改成了这个,问题就解决了:)
so i changed to this, and the issue was solved :)
kapt(Room.compiler)
这篇关于用于代码生成的ANTLR工具版本4.7.1与当前的运行时版本4.5.3不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!