Intellij 14 will not import gradle dependencies - java

In IntelliJ IDEA 14.1.4, I am working on a large Java EE project that is built with Gradle. However, when I open up IDEA and attempt to import the project from Gradle, the dependencies do not import (i.e. they do not show up in project settings and I cannot run tests or compile anything). I have tried running gradle idea, both from command line and from within IDEA, as well as refreshing my Gradle projects. I ran rm -rf ~/.IdeaIC14/ to reset my settings, just in case anything in my IDEA's Gradle settings was screwy, and I have even gone so far as to reinstall IDEA, all to no avail. My entire office is running the same version of IDEA and no one else seems to have this problem, and we are all working on the same codebase with the exact same Gradle build files. Any ideas as to what could cause this?

Related

Why is Intellij Idea freezing during indexing?

I'm on Manjaro linux using Intellij Idea community 4:2022.1.3-1 and jdk 17 for this project, maven is also present
Intellij always hangs after it starts indexing the jdk, it's responsive for a period of time but if I type anything or open a new menu after it's begun indexing the jdk it will immediately freeze and I have to kill the process.
This behavior started after I began attempting to use the luaj-jse-3.0.2 library. I got it to successfully start by removing this library once but have been unable to replicate this since.
I have tried -
Reinstalling intellij
Installing a different version
Removing the luaj library (only successful once)
Deleting the .idea folder
Running intellij in strace
Waiting for it to resolve
Several combinations of all of the above at once
I'm really at my wits' end on this, anyone know anything?
project github (this is up to date to the project): https://github.com/MorticiaGrey/CompSim
Apparently maven was having an issue with the jar I imported through intellij as a library. On a new project without maven but with the offending jar and code copied and pasted from the original project it worked fine, I also got it to work by deleting the old project and importing it again from github without building any of the maven stuff and deleting all the maven files
It may have been my fault for configuring something incorrectly somewhere, but I was using the normal method to add a library in intellij so if that's the case whoops I guess

no gradle tool in Tool windows in idea

How to make show up gradle Projects in idea.I search from View->Tool Window-> but there is only maven project. I already loaded gradle project, but I can't manage it due to not existing gradle projects.How I could make show up it or I should download it from somewhere
IntelliJ have certainly had trouble solving this particular problem, but as of 2018.3.6 the solution has certainly gotten better:
find the gradle.build file
right-click on it and select Import Gradle Project.
no idea () why they've decided to do it this way, but it works, the Gradle tool window becomes available, and it has become a gradle project.
C:\Users\user\AppData\Roaming\JetBrains\IdeaIC2021.2
There is a disabled_plugins.txt, open it and delete the "org.gradle..." things and save it. Restart IntelliJ. It helped me, there are Gradle options in New Projects.

Gradle 5 and IntelliJ 2018.3. Unrecognized option: --add-opens or java.base.java.lang=ALL-UNNAMED

I have a complex set of projects built by Gradle 4.10.3. I can build them from the command line, but I can also import them to IntelliJ 2018.3 Ultimate without major issues.
When I upgrade my Gradle to 5.1.1, the projects are still building fine from the console, however I can no longer import (or refresh) the project in IntelliJ :(
The configuration part goes fine, but the daemon process could not be started within IntelliJ. If I set Gradle JVM to Java 8 in the IntelliJ project settings, I get an error:
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: --add-opens
If I set Gradle JVM to Java 11 in the IntelliJ project settings, I get a different error:
Error: Could not find or load main class java.base.java.lang=ALL-UNNAMED
Caused by: java.lang.ClassNotFoundException: java.base.java.lang=ALL-UNNAMED
As soon as I execute gradlew wrapper --gradle-version=4.10.3 (change back the wrapper to 4.10.3), the IntelliJ plugin works fine again.
If I add gradle idea task (idea gradle plugin) to the scripts, it executes fine from the console also with the version 5.1.1.
Removing .idea settings from the user folder did not help. Clean import did not help either. All possible settings inside IntelliJ related to Gradle (including all wrapper-related settings) are tried. Nothing helped :(
The problem seems to be so trivial, however I cannot find a solution since few days :( Where those --add-opens are coming from? How to prevent this?
The cause was the gradle.properties file in the .gradle folder in the user home. Just removing the file solves this problem with IntelliJ.
Still it would be nice to know the cause of this...
Very weird bug!
Credits:
IntelliJ IDEA Gradle sync: Problem with setting Gradle's Java home to some JDKs
What worked for me is to point the IDE to your own JAVA_HOME instead of the one included in the IDE (Android Studio, though, so YMMV).
This error will occur, when you have two versions of JVM's has installed, while switching one to another version we might get this error.
Solution(IntelliJ IDE):
Click on your project -> open module settings -> go to project settings -> project language level -> change to 8 - Lambdas, type annotations etc.
once it has changed, rebuild your application.

InteliiJ Idea doesnt download maven dependencies

Today i receive notification about InteliiJ Idea's update and decided to do it. However i was using trial version of the Ultimate edition and decided to switch to community
Uninstalled ultimate version (performed OS restart), deleted all cache/profile/m2 old files and installed community version. Imported my old project, added Framework support to maven and did "Reimport".
None of the dependencies is being downloaded. Wheneever i try to add new dependency the text becomes red.
I tried everything reimport, clean, mvn clean, mvn install, even did a reinstalled the program and still my dependencies are not being downloaded.
Auto-import is on and pom. is not in the ignored list.
Delete everything but the .java files i wrote. Restarted the project then added framework support and now everything is fine

Maven options in Eclipse disappeared

I restarted my computer, and rebooted my VM with Ubuntu 12.04 on it and, I restarted Eclipse. Then I noticed that there were errors regarding the build, so I did a 'mvn clean install' on the repo in the terminal, and after that I re-imported the Maven project in Eclipse (when the option was still available). After the import finished I noticed that it said that mvn is missing the 'unpack' command in m2e. So I thought, that I needed to update the software so I went into Help > Check for Updates, and then I guess it found a better version of m2e, but now the 'Import Existing Maven Project' is gone now. I tried importing it regularly, however the 'src/java/main' and 'src/java/test' aren't distinguished as different special folders.
Has anyone else encountered this issue? If so, what did you do to solve the problem.
Thanks in advance,
ejay
If you right cliok the project and select Configure, does it offer to convert the project to Maven nature?
Generally, using the "clean" option on any tool will delete files and folders that are considered "secondary", i.e. they can be recreated easily. That might include some config files in this case.

Categories