Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 534 Vote(s) - 3.56 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Intellij shows every line in build.gradle.kts is red

#1
I created a new project from VCS (Kotlin and Gradle). I added three `testImplementation()` calls to the `build.gradle.kts`. IntelliJ didn't pickup the changes so I did `File -> Invalidate caches / Restart` and now Intellij shows every `implementation()` call and every `testImplementation()` call in red. In fact every line in every build.gradle.kts in every module is red.

Intellij has lost its mind. What do I have to do to restore IntelliJ's intelligence when it comes to kotlintest in Gradle?
Reply

#2
>What do I have to do to restore IntelliJ's intelligence when it comes to kotlintest in Gradle?

Re-import the project: File | New | Project from Existing Sources action and select build Gradle file to load the project from.
Reply

#3
The way I was finally able to solve this was with `File -> Invalidate caches / Restart`. It must have been cache corruption.
Reply

#4
I started seeing this with AS 4.2.1. Invalidating caches and re-importing the project didn't work for me. I found [this article][1] on the JetBrains issue tracker where people found that they had an extraneous JDK set in the project settings. While I did not have an extraneous JDK set in my project structure, I tried changing the JDK from the AS embedded version to an alternate AdoptOpenJDK 1.8 version I had installed. After switching to that version all the red went away and everything is resolving as expected. I was then able to switch the SDK back to the embedded version and everything continued working as expected. When switching back to the embedded version I did notice a brief message in the progress bar at the bottom of AS saying that it was processing a JDK 11. I'm not sure where that's coming from, but it does seem to be in line with what others in the JetBrains issue were talking about.

[1]:

[To see links please register here]

Reply

#5
Change your jdk.

Go to File>Project Structure > SDK Location > GradleSettings

Change the Gradle JDK to use the embedded or a compatible JDK (Azul JDK) if you're using a MAC.

Then Invalidate and refresh cache after deleting the .idea and .gradle files.
Reply



Forum Jump:


Users browsing this thread:
2 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through