Intellij idea compiles but displays lots of errors of missing dependencies on editor - intellij-idea

I am using ultimate 2019.3
I am getting this weird thing that it shows lots of compilation errors on depnedenceis such as Spring, Vertx, Guava and stuff like this, but gradle clean build and cmd + F9 works fine.
I tried stuff I found here:
invalidate caches and restart
delete both .m2 and .gradle/cahces
delete .idea (didn't find any *.iml
delete the repository and clone it again from GIT, importing it again to IntelliJ.
project structure -> set to Java 1.8 and checked structure and libraries - nothing out of the ordinary.
installed plugin - choose runtime and set IntelliJ to run on Java 1.8
nothing worked!
Maybe its JDK issue? I see my java -version returns 1.8 but IntelliJ runs with JDK 11.
I am completely lost and have no idea what to do.
Please help.
Regards,
Ido

Fixed it like this:
I deleted .gradle/cahces
I removed IntelliJ 2019.3
I also deleted my local repository
Tried to remove all old installations/version/repos.
Downloaded and installed 2020.1
git cloned my reposotory again
imported my project
**And it works !! **
I hanve no idea why...
maybe the new version.
maybe its the uninstall and remove all caches and versions.
Thanks to all of you who helped me.
Regards,
Ido

Related

Problem in running a project with aspectJ in IntelliJ IDEA 2022.2.3 (Community Edition)

I am trying to run a project with aspectJ, rather than Java, in IntelliJ IDEA. I had done it before by simply putting "aspectj-1.9.6" in a "Lib" folder and setting the folder "as Library". But I tried it again today and it is not working. I think it might be because I have updated my IntelliJ to version "2022.2.3". I saw in this link that for intelliJ version "2021.1", one should select "ajc" as the project compiler in IntellJ. But it seems that there is no such compiler option in IntelliJ version "2022.2" (as I looked at this link and also searched in this link).
I also tried to install and enable "AspectJ weaver" plugin, but I encounter the following error: "Plugin 'AspectJ weaver' failed to initialize and will be disabled. Please restart IntelliJ IDEA.". Someone has had the same problem in this post, but the answer doesn't work for me, as it refers to this link, which is not compatible with IntelliJ version 2022.2.3:
So, I wonder whether aspectJ is not supported any more in IntelliJ?
Does any one has any suggestion that I could use it with this version of IntelliJ? I do really appreciate any help.
Thanks in advance
IntelliJ IDEA is compatible with AspectJ. I am running the plugin on 2022.2.3 without any problems. But I use IDEA Ultimate, you use Community. Did you notice this in your screenshot?
Compatible with IntelliJ IDEA Ultimate

Intellij shows every line in build.gradle.kts is red

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?
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 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.
The way I was finally able to solve this was with File -> Invalidate caches / Restart. It must have been cache corruption.
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.
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.

IntelliJ Idea red Spring and Lombok annotations

I have a problem with IntelliJ Idea 2020.1 Ultimate Edition. It shows Lombok and Spring annotations and imports in red. The project compiles, I can run tests. I did some googling. I tried to reimport maven projects and go to File->Invalidate Caches/Restart. Then I deleted Idea system directory - it does not help. Before it worked fine, I do not know why it started doing this. Can somebody help me out?
I am not sure it is a correct solution, but it worked for me. I just reinstalled IDEA. It was faster that talk to IDEA support trying to figure out what is the cause of the issue
I got the same problem and fixed it from this way. First download lombok dependency from spring.
Then go to IDE and paste it to pom file and run. It isn't fix your problem. Go to Choose this and clear cache. Then restart.
If isn't fix your problem then go to this site and download relevant version of lombok for your IDE. https://plugins.jetbrains.com/plugin/6317-lombok
enter image description here
Then it will download a file. Then go to where you install the IDE and go to this path and paste that lombok java file.
IDE path
After trying these methods error was fixed. Thank you.

IntelliJ IDEA 15 Ultimate, Other Settings missing from Settings window

I recently upgraded from IntelliJ 14 to 15 ultimate and I realized I can no longer configure checkstyles as Other Settings in setting window is completely missing.
I cannot understand what I did wrong, and I am not sure if it's some configuration missing to get this Other Settings back.
Exact version : IntelliJ Ultimate 15.0.1
Here is how it looks:
What I tried:
Well I tried searching if there is a way to bring it back, but no luck yet. my colleague is using same version and he can see it. So may be during importing some settings or default configuration from IntelliJ 14, something went wrong.
This happened on an EAP build of Intellij 15:
Solution 1
I had the same issue after upgrade. For me the fix was simply to uninstall Checkstyle-IDEA, restart Intellij and then install it again after which I was able to see: Refer here for doing the same : IntelliJ Installing Plugins
Solution 2
If a restart does not fix your problem, I would recommend a manual cleanup. Steps to do so:
Uninstall Checkstyle-IDEA plugin from within Intellij
Close Intellij and remove the Checkstyle-IDEA directory from the plugins folder. The location of the plugins folder depends on the OS and is documented here : https://devnet.jetbrains.com/docs/DOC-181 For example: Windows: <SYSTEM DRIVE>\Users\<USER ACCOUNT NAME>\config\plugins OSX: ~/Library/Application Support/IntelliJIdeaXX
Re-install the plugin and (after a restart) check if you can see the 'Other Settings' -> 'Checkstyle' section again.
Suggestion
Also, I am tempted to suggest that it might be worth seeing if the 'Other Settings' section appears when you install a plugin like 'Grep Console' which puts it's settings there:

Why does intellij IDEA highlight build.sbt?

I've recently create a new project with sbt in IDEA and got this
What's wrong with it? I have scala plugin installed and enabled and IDEA version is 14.
Ok, I've found a solution to resolve this problem. Here is the link: https://stackoverflow.com/a/26767860/3974509
You need to invalidate cahce and dsable old SBT plugin.
Caches invalidation: File > Invalidate Caches/Restatr