After updating to latest IntelliJ 2016.2.5 (community), when I create new class that requires import of new library in class or some times when I have code errors, it shows a red line under the class name, but after fixing the error, the red line is still present but the class works fine.
Example in one of the scenarios I have had a working class I have previously worked on with jfree chart example, I have copied the class to my new project, and I added the org.jfree dependency in Maven, after updating maven, I was able to build and run the class with out problems, but it kept the red line.
When IntelliJ need to make mass error line updates, it does not refresh the red line even thus it is fixed.
Note:
This behavior doesn't happen for small error issues
This issue didn't occur in previous versions.
Rebuilding and cleaning project does not help.
My Solution right now is to restart IDE.
My Question is this a bug? Or is it some setting I have to do on this version?
Software info:
Build #IC-162.2228.15, built on October 14, 2016
JRE: 1.8.0_112-release-287-b2 x86
JVM: OpenJDK Server VM
On Windows 10 with latest updates
Here is example of the error:
Since I installed the latest version IntelliJ 2016.3 I have not faced this problem. So I assume this must be a bug that is solved on this version.
Related
I am trying to get jetbrain's rust course working but I have this problem:
I have installed the rust toolchain and the rust plugin. When I click update on the problem this comes up:
so I press ok and nothing happens. Does anyone know what the problem could be?
I am using Intellij community with the education version and I am on a windows machine.
This is caused by https://youtrack.jetbrains.com/issue/EDC-740/Cannot-start-Learn-Rust-Course
Please try the course again and it should work now.
The problem here is that the course published from nightly plugin version where a new version of the archive format was introduced (15).
As a result, stable plugin complains that it doesn't support the new format version but at this moment there isn't new stable version with new format support
An archive generated with the stable EduTools is uploaded, the corrupted version is hidden. It should be ok now.
Here's a fun one. I did search for this issue but didn't seem to find anything that helped, including the following questions which seemed most closely related:
Why am I getting "Local path does not exist" from my Android project in IntelliJ IDEA?
IntelliJ IDEA: Project SDK Settings is not retained after reopenning IDE
Version info:
MacBook Pro mid-2014 (Intel), Big Sur 11.2.1
IntelliJ IDEA 2021.2.2 (Community Edition)
Build #IC-212.5284.40, built on September 13, 2021
Runtime version: 11.0.12+7-b1504.28 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.2.1
Kotlin: 212-1.5.10-release-IJ5284.40
Issue description: On opening an existing project, importing the related module, and selecting the SDK, everything works fine. However, the recent projects list shows what appears to be a random, temporary path to the project IML:
The path you see in the screenshot is not the path that leads to the IML. Not even by a long shot. This is created when opening the project initially but, on exiting IDEA, it seemingly disappears and I have to reimport the project all over again. I am stumped here. I spent a couple of days digging through SO, and the internet in general but can't seem to find anything related to this specific error or anything that has helped at all. Any input would be great. This is on a fresh installation of IDEA, and I have cleared the caches with no observable effect.
Try to close the project and the IDE, open the project root directory in the OS file explorer, delete all.iml files and the .idea directory, and reimport the project from existing sources
You can try "open" button on the IDE welcome page, I made it.
I just released a first version of my Kotlin MPP as a library 3 days ago. It was integrated on Android and iOS successfully.
After the first released I switched to a coworkers branch and invalidated my caches. Since then I am not able to sync gradle anymore.
I'm getting this error:
Task :cinteropSnowplowTrackerIosArm64
Exception in thread "main" java.lang.Error: /var/folders/gv/rc4dmzjs3wj9kt4kr00nwhdw0000gn/T/13496315139908854548.m:1:9: fatal error: could not build module 'SnowplowTracker'
at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:152)
at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesASTFiles(ModuleSupport.kt:68)
at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesInfo(ModuleSupport.kt:14)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.buildNativeLibrary(main.kt:515)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:266)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:76)
at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:45)
at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:38)
at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:60)
Even after going back to my very first POC commits, which was successfully published several times I am not able to build anymore.
Here is how I integrated the iOS dependency.
I don't have any idea what the issue is. I tried setting a whole bunch of different JDK versions (8, 11, 14, 15, 16, 17) without success. I tried upgrading Kotlin version from 1.4.20 to 1.5.x. I tried downgrading IntelliJ IDEA and many more things all without success. The only guess I have right now is that it is related to some plugin updated. How could I verify that?
Here is how the pod is integrated:
cocoapods {
ios.deploymentTarget = "12"
summary = "Kaia tracking library"
homepage = "https://github.com/KaiaHealth/kaia-tracking-library"
authors = company
pod("SnowplowTracker") {
version = "~> 1.2.0"
}
}
With credits to xoif as he answered this on youtrack. The problem seems to be xcode command line tools 13 and the solution is to downgrade:
Download Xcode 12.5
Select Xcode 12.5.1 as default Command Line Tool (in Xcode -> Preferences -> Locations)
cinterop should work again.
I think it has something to do with recent Xcode/toolchain update. I've got the same problem with other cocoapod that was compiling fine last week. I've just removed the pod for now, but probably if there's a way to downgrade xcode toolchain - it might help.
Im glad the xcode downgrade helped some of you. Some of the issues regarding Xcode 13 and Clang/cinterop will be supposedly fixed with Kotlin 1.6.0. However, the current preview (1.6.0-M1) still fails for me because of other issues. If I find a way to make my configuration run with kotlin 1.6.0 and Xcode 13, I'll let you know in this thread.
I downloaded Intellij Idea and was using it just fine for a while. I don't know what happened between the time it was working and when it started to not work. When I would click the shortcut, my mouse would give me the loading wheel and then nothing would happen. In task manager, there is a task called "IntelliJ Idea" running. I uninstalled and reinstalled twice, and then installed it with the JetBrains toolbox, but this is still happening. I saw another thread about this from 4 years ago, but none of the solutions worked for me.
Other thread: Intellij IDEA won't start
I thought I would post this since I recently came across a similar issue with IntelliJ IDE Community Edition but for MacOS and it seems like the same issue could potentially happen on Windows.
I was using the JetBrains Toolbox to manage the installations and updates and after a recent update, when trying to start the app it would simply attempt to start and get killed straight away. After not having much luck with the logs I eventually found the exception that was being thrown when it attempted to start:
java.lang.UnsupportedClassVersionError: com/intellij/util/lang/PathClassLoader has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
So from this I realized that the app was trying to run with an older version of Java and I found how to change it in this post. In my case the 'idea.jdk' file was located in '/Users/user/Library/Application Support/JetBrains/IdeaIC2021.2' and for some reason was not updated after the application update.
Before you write me off, please consider that neither of these are answers to my question:
How to setup SDK in IntelliJ IDEA?
How do I change the IntelliJ IDEA default JDK?
In IntelliJ IDEA 2017.2.6, attempting to add JDK9 as an SDK passes but does not work as the classpaths end up empty. Steps to reproduce:
Open 'Add new SDK dialog'
(go to Project Settings > Project > Project SDK > New > JDK)
Select JDK 9
Passes, but if you look under SDK > JDK9 classpaths are empty and your code errors out due to base classes not being found. See image:
In IntelliJ IDEA 2017.3 EAP you get an error about JDK classes not being found. See images below:
Open 'Add new SDK dialog'
(go to Project Settings > Project > Project SDK > New > JDK)
Select JDK 9
Should pass, but produces error popup
Command line compilation of HelloWorld example with jdk9 works as expected.
EDIT: Found an almost-duplicate: Intellij IDEA 2017.2 can't add openjk 9 on Linux Mint 18. Key differences:
Linux version: they're using Mint 18, and I'm using Debian Stretch.
OpenJDK is the latest from the repo at the moment of writing: 9~b181-4~bpo9+1. Even though is the same version, it still does not work in my case.
EDIT: Another possible duplicate: intellij idea does not see java 9 standard classes
I did not understand the answer from the comments though. Tried setting different names for JDK (9 and 1.9) but it still did not show modules instead of classpaths and classpaths remained empty.
Current debian binary package openjdk-9-jre-headless 9~b181-4 contains incorrectly compiled lib/jrt-fs.jar file.
There are 2 filed issues separately on both idea youtrack and also ubuntu launchpad.
As it is indicated here:
Probable reason:
Classes in lib/jrt-fs.jar were compiled by Java 9 with options "-source 8"/"target 8". They should be compiled with "--release 8" option instead (or by Java 8)
A temporary workaround may be replacing /usr/lib/jvm/java-9-openjdk-amd64/lib/jrt-fs.jar with the one from Oracle JDK.
You may also try to recompile the openjdk-9 source using the advised option "--release 8".
Anyway I advice to vote up this issue on the above link to attract more attention by dev team.
Use Oracle Java instead of OpenJDK for now. You can pull that in through WebUpd8's repository.
sudo add-apt-repository ppa:webupd8team/java &&
sudo apt-get update &&
sudo apt-get install oracle-java9-installer
It doesn't look like this is going to work with OpenJDK, so if you want to play with the latest and greatest Java, this is going to be the way to do it for now. Otherwise, from what I've seen, you've done this correctly and once this gets actually fixed, it will work just fine.