错误在模块"cordapp-example"中找不到类"com.example.NodeDriverKt" [英] error Class 'com.example.NodeDriverKt' not found in module 'cordapp-example'

查看:237
本文介绍了错误在模块"cordapp-example"中找不到类"com.example.NodeDriverKt"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

While running a corDapp(corDapp-example) for the first time using Kotlin-source, the IntelliJ throws this error - "error Class 'com.example.NodeDriverKt' not found in module 'cordapp-example". I looked for this class in my project structure and I can see a file named NodeDriver.kt which contains a function "main" but I could not see any class declaration. Any solution to remove this error would be much appreciated.IntelliJ

推荐答案

我在示例cordapp中也遇到了同样的问题.通过删除项目中的build和gradle文件夹,然后再次打开Jet Brains IDE,我能够解决此问题.这重新开始了安装gradle的过程.然后,以正确的方式设置配置文件.以前,所有的类路径都不存在.看一下我执行上述步骤后预设的kotlin新配置.现在使用模块的类路径"是com.example.workflows-kotlin.test =>

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 =>

我希望这会有所帮助:)

I hope this helps :)

这篇关于错误在模块"cordapp-example"中找不到类"com.example.NodeDriverKt"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆