IntelliJ IDEA 12 Android slow response - intellij-idea

When I type in the IntelliJ Editor I get major lags from multiple seconds, until my typed word gets displayed.
I'm running IntelliJ with Maven and Git to build Android Projects.
idea.exe, idea64.exe and idea.bat did produce the same issues.

My mistake was to apply the Android SDK in my Project settings.
Goto File | Project Structure | SDKs
Remove all Android related SDK's
Add only your default Java JDK like JDK 1.7 (default under: C:\Program Files\Java\)
Goto the Modules Tab
Apply the JDK to all modules or set ProjectSDK as it should now be the JDK1.7
As I tried to solve this problem for several days including adding the IDEA_JDK Variables
I thought sharing this solution could be helpful

Related

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 doesn't recognize jvm when I try to configure jdk

I'm working on mint-cinnamon as my file-system and running intellij on it,
I'm trying to add jdk to intellij but when i'm looking for it trough intellij it doesn't show any jdk nor jvm file though I know that these files exist (open jdk 8 and open jdk 11 and jvm) and I know where they are.
I've tried reinstall jdk11 and 8, rebuild the project, and download lib32.
enter image description here
enter image description here, enter image description here
try: Project structure -> Platform settings -> SDKs
Then add the path to the jdk.
After that got to Project under Project settings and select the project SDK.
I've worked with mint and intellij, and had no problems.

IntelliJ IDEA Ultimate with Play Framework 2.6.7 Java imports 'symbol not resolved'

Be it an example project, freshly downloaded from Play Framework's website, or my project which is derived from that with a few changes to templates - nothing big - IntelliJ just can't seem to find the appropriate dependencies or sources necessary for Play development.
I've already installed Scala plugin for IntelliJ, which includes support for Play Framework. I'll outline the process that I've followed, after reading multiple articles from Play's documentation as well as questions asked on here though no answer has proven incredibly useful as yet.
Open Project Settings within IntelliJ IDEA Ultimate 2017.2.6
Click Modules > [+] > Import Module
Find build.sbt within project root
Import with default SBT settings:
Download: [checked] Library sources, [checked] SBT source
[unchecked] Use SBT shell for build and import (requires sbt 0.13.5+)
Project JDK: [9.0 (java version 9.0.1)] -- Could this be the problem? (compatibility)
SBT compiles and I get this error, which I somewhat dismissed but reading it now seems to be somewhat telltale but I am unsure of what: https://pastebin.com/tXbHQdek
Running the site works, using sbt run, but when opening .java sources, IntelliJ marks errors upon import play.mvc.* though import views.html.* works fine. Adding framework support for Play 2.x seems to do next to nothing, as no project settings seem to change, and the error is not resolved.
This behavior exists with a clean IntelliJ 2017 Ultimate install (as of today) and an example project from Play Framework with no modifications, so if a solution cannot be found I'll probably consider posting an issue on one or more of their issue trackers.
Any ideas on how to get my Play Framework development environment working?
Thanks :3
This did not originally occur to me but in my search through the Play Framework Google group, I found a suggestion on a somewhat recent post to uninstall Java 9 as Play's dependencies are not yet compatible with it and hence won't resolve.
For anyone who might come across this issue, hopefully this saves you some days headbanging:
Optional - Uninstall JDK and JRE 9
Install JDK 8 (comes with JRE)
From within IntelliJ, File > Project Structure > SDKs > [any Java 9 JDK] > [-]
[+] > `Find your JDK 8 installation folder
32 bit: C:/Program Files (x86)/Java/jdk****/
64 bit: C:/Program Files/Java/jdk****/
Where **** is your Java version, such as 1.8_152, as in jdk1.8_152
Press OK. You'll get a warning that the project SDK is missing or similar, so click the link it provides you to configure that and select your newly configured JDK.
Everything should work from there, just straight away after IntelliJ indexes, which can be tracked in the bottom right corner as with all other operation progress.

IntelliJ doesn't show project structure correctly

I followed instruction from following link to create a Play project in IntelliJ but IntelliJ doesn't show correct structure.
https://www.jetbrains.com/help/idea/getting-started-with-play-2-x.html
Snapshot attached
I ran into the same issue and found this: Building a Play 2.6 project from IntelliJ builds nothing
So now we're 3 people with the same problem. I haven't found any open bug report or issue anywhere.
I got it working using the workaround that OP from the other question suggested: "Build the project from SBT in your desired location first, and then import the project from IntelliJ as an SBT project and you should be good to go."
To do that just run sbt new playframework/play-scala-seed.g8 (assuming you have SBT installed and PATH configured), and import that.
I raised the issue with IntelliJ support. It seems to be fixed in the latest release of IntelliJ ultimate edition. If you run the default application and see 'no jdk error', go to edit configurations and select the top level project in play module (see pic)

IntelliJ 14.1 is too slow when I import a Maven project

If I import a Maven project (Import Project > choose the main pom.xml file > check Import Maven projects automatically > Next ...):
in IntelliJ IDEA 14.1 Ultimate Edition it takes about 5 hours until is ready.
in IntelliJ IDEA 14.0.3 Ultimate Edition it was about 20 times faster.
During the processing, if I maximize a popup it looks like:
The modules (folders) in the Project area are shown only at the end (only the files from the main directory are shown during the "resolving" - in this case immediately).
The jar files are already in the .m2 folder, so the problem is not related to the time for downloading those jars.
Is there a "hidden" setting needed to improve the performance? (a check box, a command, etc.)
Details:
Windows 7
Java 7
Apache Maven 3.2.1
Edit:
JDK, Maven, .m2, IntelliJ IDEA and the project sources are on the same drive
JetBrains wrote:
Your projects open faster and the IDE is more responsive as some processes now run in the background.
regarding IntelliJ IDEA 14.1 and probably it is faster but (at least for me) not using the default settings.
If you use the bundled Maven that comes with Idea 14.1, have a look here: Slow Intellij IDEA deployment . Using an installed Maven seems to be much faster.
Another improvement could be to change the JDK for importer (and probably the VM options for importer) from Use internal JRE to your own JDK:
It's all because Maven version. Maven 3.0.5 or Maven 2.x use simplified dependency resolution so often it can be used during import for big projects. Thought it can work incorrect for some projects which uses 3.1+ Maven.
Switching off auto-importing is another solution.