This issue just recently (past couple days) started occurring on one of my development machines.
I'm using Eclipse's Vert.x dependency for a web project:
build.gradle
dependencies {
...
// Kotlin
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
// Vert.x for web framework
compile group: 'io.vertx', name: 'vertx-core', version: '3.4.2'
compile group: 'io.vertx', name: 'vertx-web', version: '3.4.2'
...
}
This has worked fine in the past - I think the triggering action was my upgrading to IntelliJ 2017.2.2, but now:
-web
imports: How did this happen , and how can I make sure it's properly recognized as a Java dependency?
Edit: Sample project available here: https://youtrack.jetbrains.com/issue/IDEA-177950
This is a bug in the Kotlin plugin which is fixed in version 1.1.4-2. After you update the plugin, you need to delete the incorrect libraries and reimport your project from Gradle to have your project fixed.
If you face such problems, the first two things you always can do is:
File > Invalidate Caches/Restart
Refresh all gradle dependencies
If this doesn't help, please check if ./gradlew clean testClasses
succeeds or also fails with such an error.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.