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
相关问题
- Could not read entry … from cache taskArtifacts.bi
- How to refresh height of a Constrained View in Con
- Configure gradle plugin based on future tasks
- Configure gradle plugin based on future tasks
- How to fix the error Cannot change strategy of con
相关文章
- In IntelliJ IDEA, how can I create a key binding t
- Android BuildConfig Field generating String incorr
- IntelliJ IDEA can't open projects or add SDK o
- SonarQube: How to suppress a warning in Kotlin cod
- What are the `^let` annotations in Android Studio
- IntelliJ Subversion Authentication Required Dialog
- Gradle Could not find method “() for arguments on
- Gradle Custom Plugin: gradleApi() vs Explicit Depe
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 :)
Solution 1 : It is a problem centric to 'Caching issue' of IntelliJ IDE. Open menu:
File
and hitInvalidate Caches / Restart...
.Solution 2 : If the problem still persists then remove the gradle folder from the project and close the project and after opening the IDE ,it will setup the gradle again.And it will solve the issue. While debugging the application,now you will be able to see the class path.
A Kotlin file called
FileName.kt
with amain
method is compiled into a JVM class calledFileNameKt
. So theNodeDriverKt
class is generated when the Kotlinmain
method inNodeDriver.kt
is compiled into a JVM class.This appears to be an IntelliJ caching issue. Try deleting the
Run Example CorDapp - Kotlin
run configuration (even if you are not using it directly to run the driver.