Android studio,import maven project cause java.lang.IllegalArgumentException:No enum constant ... JDK_1_9

时间:2014-08-26 06:43:14

标签: java android maven android-studio

导入android maven项目时出现此问题,导致以下错误:

 Error:Internal error: (java.util.concurrent.ExecutionException) java.lang.IllegalArgumentException: No enum constant org.jetbrains.jps.model.java.LanguageLevel.JDK_1_9
java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: No enum constant org.jetbrains.jps.model.java.LanguageLevel.JDK_1_9
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:188)
    at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadModules(JpsProjectLoader.java:268)
    at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadFromDirectory(JpsProjectLoader.java:122)
    at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadProject(JpsProjectLoader.java:98)
    at org.jetbrains.jps.model.serialization.impl.JpsSerializationManagerImpl.loadModel(JpsSerializationManagerImpl.java:41)
    at org.jetbrains.jps.cmdline.JpsModelLoaderImpl.loadModel(JpsModelLoaderImpl.java:45)
    at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:71)
    at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:198)
    at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:113)
    at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:133)
    at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.IllegalArgumentException: No enum constant org.jetbrains.jps.model.java.LanguageLevel.JDK_1_9
    at java.lang.Enum.valueOf(Enum.java:236)
    at org.jetbrains.jps.model.java.LanguageLevel.valueOf(LanguageLevel.java:21)
    at org.jetbrains.jps.model.serialization.java.JpsJavaModelSerializerExtension.loadJavaModuleExtension(JpsJavaModelSerializerExtension.java:178)
    at org.jetbrains.jps.model.serialization.java.JpsJavaModelSerializerExtension.loadRootModel(JpsJavaModelSerializerExtension.java:66)
    at org.jetbrains.jps.model.serialization.module.JpsModuleRootModelSerializer.loadRootModel(JpsModuleRootModelSerializer.java:145)
    at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadModule(JpsProjectLoader.java:296)
    at org.jetbrains.jps.model.serialization.JpsProjectLoader.access$100(JpsProjectLoader.java:60)
    at org.jetbrains.jps.model.serialization.JpsProjectLoader$3.call(JpsProjectLoader.java:263)
    at org.jetbrains.jps.model.serialization.JpsProjectLoader$3.call(JpsProjectLoader.java:260)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:37)
    ... 6 more

这是strange org.jetbrains.jps.model.java.LanguageLevel.JDK_1_9 afaik,当前版本是jdk 8. Maven,java和android sdk环境路径已经过检查和设置正确。

此致

0 个答案:

没有答案