Compilation failed; see the compiler error output for details.

1. As运行时报错:

Compilation failed; see the compiler error output for details.

编译失败;有关详细信息,请参见编译器错误输出。

2. 解决方案

在terminal中输入gradlew compileDebugSources 可以看到具体原因以及报错行号

> Task :app:compileDebugJavaWithJavac FAILED
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.1F:\Android\app\src\main\java\com\db\dao\ChatRowDao.java:22: 错误: Not sure how to handle insert method's return type.
    Long insert(ChatRow... chatRows);
         ^
1 个错误

FAILURE: Build failed with an exception.

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。