问题
报错: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.1
解决
在 app 的 build.gradle 中加入:
configurations.all() {
resolutionStrategy.force "org.antlr:antlr4-runtime:4.7.1"resolutionStrategy.force "org.antlr:antlr4-tool:4.7.1"}
如图:
结果还是失败,然后将4.7.1
换为4.5.3
,成功之后 run
。
run 之后还是失败: