错误模块“ cordapp-example”中找不到类“ com.example.NodeDriverKt”

Abh*_*agi 2 intellij-idea gradle kotlin blockchain corda

第一次使用Kotlin源运行corDapp(corDapp-example)时,IntelliJ会引发此错误-“模块'cordapp-example中找不到错误类'com.example.NodeDriverKt'”。我在项目结构中寻找了此类,可以看到名为NodeDriver.kt的文件,其中包含函数“ main”,但看不到任何类声明。任何消除此错误的解决方案将不胜感激。IntelliJ

Nan*_*hra 5

i had this same problem with the example cordapp. I was able to resolve this problem by deleting the build and gradle folders in my project, and then, opening the jet brains IDE back again. This restarted the process of installing the gradle. Then the configurations file were set the right way. Previously all the class paths were not there. Have a look on my new configuration of kotlin that was preset after performing the above step. "Use Classpath of module" now is com.example.workflows-kotlin.test =>

Kotlin配置,用于运行示例cordapp

I hope this helps :)