Error:Kotlin: Unknown JVM target version: 1.8 Supported versions: 1.6

I am new to IntelliJ IDEA plugin development. I followed instructions here to setup the development environment. I set both jdk 1.8  as 1.8 and jdk 1.6 as IDEA jdk as mentioned in the guide. But when I try to set the Intelli Platform Plugin SDK, it doesn't allow me select IDEA jdk which I set before in the project structure, as the internal java platform. 

Only jdk 1.8 is allowed to be selected, But when I build the source with jdk 1.8 following error occurs. 

    Error:Kotlin: Unknown JVM target version: 1.8
    Supported versions: 1.6

I tried several times. But I was not able to find a solution. 

15 comments

I've just pushed the fix to 'master' sources, it'll be available on Github soon.

As a workaround you can update Kotlin plugin (File | Settings | Plugins) to version 1.1.x.

1

@Nikolay Chashnikov I got your patch from repo. Now the kolin error has been gone away. But now I'm experiencing following error. 

 

Error:(240, 32) java: no suitable method found for registerSMAttributes(com.intellij.rt.execution.junit.ComparisonFailureData,java.lang.String,java.lang.String,java.util.Map<java.lang.String,java.lang.String>,java.lang.Throwable,java.lang.String,java.lang.String)
method com.intellij.rt.execution.junit.ComparisonFailureData.registerSMAttributes(com.intellij.rt.execution.junit.ComparisonFailureData,java.lang.String,java.lang.String,java.util.Map,java.lang.Throwable) is not applicable
(actual and formal argument lists differ in length)
method com.intellij.rt.execution.junit.ComparisonFailureData.registerSMAttributes(com.intellij.rt.execution.junit.ComparisonFailureData,java.lang.String,java.lang.String,java.util.Map,java.lang.Throwable,java.lang.String) is not applicable
(actual and formal argument lists differ in length)

I have setup both java 1.8 as 1.8 and java 1.6 as IDEA jdk as mentioned in the documentation. I tried both community edition and ultimate edition for setting up the IntelliJ Platform Plugin SDK. I selected java 1.8 as internal java platform for IntelliJ Platform Plugin SDK.

0

Which version of Java 1.8 do you use? Probably the problem is caused by a bug in javac. Try updating to the latest version (1.8.0_121).

0

Earlier I was using jdk1.8.0_112. Now I updated to jdk1.8.0_121. But the error still exists. The problem is that the supported syntax is 

ComparisonFailureData.registerSMAttributes(ComparisonFailureData notification,
String trace,
String failureMessage,
java.util.Map attrs,
Throwable throwable,
String comparisonFailurePrefix)

But the syntax in the source code is

ComparisonFailureData.registerSMAttributes(failureData, 
getTrace(ex),
ex.getMessage(),
attrs,
ex,
"Comparison Failure: ",
"expected: <");

 

0

Looks like you have an old version of java/java-runtime/src/com/intellij/rt/execution/junit/ComparisonFailureData.java in your sources, 'registerSMAttributes' method should have one more parameter (String expectedPrefix). Updating sources should solve the problem.

0

Thank you very much Nikolay Chashnikov for instant replies. 

I have enabled only the stable updates. Therefore earlier I was using idea-IC-163.13906.18 source. Now I updated source to idea-IC-171.3780.107. My java version is jdk1.8.0_121. Now earlier problems have been disappeared. But now new problems have been raised. 

Error:(1250, 88) java: cannot find symbol
symbol: method modifyLowerBoundAnnotations(com.intellij.psi.PsiType,com.intellij.psi.PsiType)
location: variable modifier of type com.intellij.psi.augment.TypeAnnotationModifier

Error:(164, 3) java: method does not override or implement a method from a supertype
Error:(61, 81) java: <anonymous com.intellij.psi.NonClasspathClassFinderRs152.82> is not abstract and does not override abstract method before(java.util.List<? extends com.intellij.openapi.vfs.newvfs.events.VFileEvent>) in com.intellij.openapi.vfs.newvfs.BulkFileListener

Can you please help me in resolving these issues? I am a beginner for IntelliJ IDEA plugin development. 

0

 @Nikolay Chashnikov can you please said where is the issue? Is it also some version conflict? 

0

Yes, it looks like you have inconsistent versions of different files. How do you update the sources?

0

I downloaded IntelliJ IDEA community version .tar.gz from https://www.jetbrains.com/idea/ and extracted it to /opt. Then selected that when setting up the IntelliJ Platform Plugin SDK and java 1.8 as internal java platform. The opened project is the source code of the intellij-community which was cloned from https://github.com/JetBrains/intellij-community. I am using IntelliJ IDEA 2016.3.5 Ultimate as development IDE. 

0

How did you clone sources of intellij-community? Did you invoke 'Update Project' from IDEA or clone via command line? Are you sure that cloning finished without errors?

Accordinlgy to the compilation errors it looks like you have an older versions of some files in your sources (e.g. java/java-psi-api/src/com/intellij/psi/augment/TypeAnnotationModifier.java)

0

I cloned from the command line. Yes there were no errors. Then I executed the getPlugins.sh also. That execution was also succeeded. Now I am taking another clone. I will check right after cloning completes. 

0

@Nikolay Chashnikov I just updated the intellij-community code and now I have the code up to date for the last commit. I have set  idea-IC-171.3780.107 as the source for IntelliJ SDK. But still the errors are occurred. 


/tmp/intellij-community/platform/core-impl/src/com/intellij/openapi/application/TransactionGuardImpl.java
Error:(243, 3) java: method does not override or implement a method from a supertype
0

Wait, why do you setup a IntelliJ Platform SDK for intellij-community project? You don't need to do this, our Readme clearly says that you need to setup SDKs named '1.8' and 'IDEA jdk' pointing to regular JDK installations.

0

Thank you very much for the continuous support. I followed the jetbrains documentation. It seems I have misunderstood the document. Here it doesn't mention to set the project SDK as java 8. Therefore I thought the project SDK should be defined as mentioned here. Now I set the project SDK as java 8. Everything works fine now. Thanks again. 

0

Please sign in to leave a comment.