Gradle没有更多的细节’:compileKotlin’
我是gradle和kotlin的新手
当我建立语法错误文件使用gradle build
它只是显示
Execution failed for task ':compileKotlin'. > Compilation error. See log for more details
我如何得到像使用kotlinc
哪一行的语法错误?
PS:使用vscode,所以我需要它
编辑
对不起,我错过了错误信息,因为gradle
和kotlinc
不同
gradle这个:
PS C:\PlayGround2> gradle build e: C:\PlayGround2\src\main\kotlin\Main.kt: (26, 1): Expecting a top level declaration > Task :compileKotlin Using kotlin incremental compilation ...
kotlinc:
PS C:\PlayGround2\src\main\kotlin> kotlinc .\Main.kt Main.kt:26:1: error: expecting a top level declaration } <--- this line not shown in kotlinc
这是一个已知的问题,有人通过卸载所有Java版本解决了这个问题,只安装了JDK 8。
编辑:也检查这个链接: https : //github.com/waicool20/KAGA/issues/27
祝你今天愉快。
- android – 运行应用程序失败,错误“com.android.builder.dexing.DexArchiveMergerException:无法合并dex’
- 没有IDE协助的Kotlin为Gradle设置 – Kotlin类没有使它成为classpath
- Android Gradle奇怪的错误
- 在Kotlin脚本中用扩展方法问题
- 包含gradle脚本kotlin文件的IntelliJ自动完成
- 如何添加RecyclerView依赖 – gradle 3
- 如何使用Gradle和Kotlin创建单独的测试?
- Gradle 3.0.0(在Android Studio 3.0中)重新排列任务序列(用Kotlin模块编译时)?
- 从TeamCity 10中的多个Gradle构建步骤收集和聚合jacoco结果