IntelliJ build.gradle.kts indicates errors but runs fine.

已回答

 

When importing the project from https://github.com/kotlin-hands-on/jvm-js-fullstack/tree/final. Intellij shows errors in the build.gradle.kts and the settings.gradle.kts file:

However, gradlew build runs without errors/exceptions.

How do I fix this?

4

Hello,

You can try the following:

  • File | Invalidate Caches & Restart menu option, then Build | Rebuild Project
  • Update Gradle to the latest version
  • Reload the project from the Gradle tool window
-8
Avatar
Permanently deleted user

I have the same error, started with all my project a couple of versions back, and this for both newly imported project and existing

1

Hi Max - please report this to our issue tracker (https://youtrack.jetbrains.com/newIssue?project=IDEA), attach a demo project to reproduce the issue on and the idea.log file (Help | Show Log in...).

0
Avatar
Permanently deleted user

I have created a case, however somebody must already have reported this, a colleague of mine responded that this a has be errornous for a long time now.

0

Thank you Max, I will look into this (IDEA-250271).

0

2021.2 with Kotlin 212-1.5.10-release-IJ4746.92, having the same problem.

0

The workaround that @... posted worked for me. For Android Studio, i just had to delete my ~/Caches/Google/<Android Studio version>, and then my Gradle KTS files no longer showed errors. For other jetbrain IDE's, check out the youtrack Petr linked

Thank you Petr!

0

请先登录再写评论。