Gradle没有更多的细节’:compileKotlin’

我是gradle和kotlin的新手

当我建立语法错误文件使用gradle build它只是显示

 Execution failed for task ':compileKotlin'. > Compilation error. See log for more details 

我如何得到像使用kotlinc哪一行的语法错误?

PS:使用vscode,所以我需要它


编辑

对不起,我错过了错误信息,因为gradlekotlinc不同

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

祝你今天愉快。