IDEA使用踩坑

@[TOC](Error:Internal error: (java.lang.IllegalArgumentException) Argument for @NotNull parameter ‘name’ of org/jetbrains/jps/model/impl/JpsProjectImpl.addRunConfiguration must not be null)

在开发过程中,从SVN拉了一下代码,重新启动项目在build的时候就报错了:

Error:Internal error: (java.lang.IllegalArgumentException) Argument for @NotNull parameter 'name' of org/jetbrains/jps/model/impl/JpsProjectImpl.addRunConfiguration must not be null
java.lang.IllegalArgumentException: Argument for @NotNull parameter 'name' of org/jetbrains/jps/model/impl/JpsProjectImpl.addRunConfiguration must not be null
	at org.jetbrains.jps.model.impl.JpsProjectImpl.$$$reportNull$$$0(JpsProjectImpl.java)
	at org.jetbrains.jps.model.impl.JpsProjectImpl.addRunConfiguration(JpsProjectImpl.java)
	at org.jetbrains.jps.model.serialization.runConfigurations.JpsRunConfigurationSerializer.loadRunConfigurations(JpsRunConfigurationSerializer.java:63)
	at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadFromDirectory(JpsProjectLoader.java:225)
	at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadProject(JpsProjectLoader.java:98)
	at org.jetbrains.jps.model.serialization.impl.JpsSerializationManagerImpl.loadModel(JpsSerializationManagerImpl.java:42)
	at org.jetbrains.jps.cmdline.JpsModelLoaderImpl.loadModel(JpsModelLoaderImpl.java:50)
	at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:80)
	at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:279)
	at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:135)
	at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:228)
	at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

看到报错日志有明确的报错类文件和方法,然后搜索了一下发现自己的项目里面是没有这个文件的,然后看了一下这个文件的目录是:org/jetbrains/jps/model/impl/JpsProjectImpl.addRunConfiguration,我猜测可能是idea出了问题与项目里面的代码冲突导致的,网上查了很多方法都不行,尝试了很多方法:比如:clean project、清理idea缓存并重启、重新安装idea。发现都不行,后面问了公司同事猜测可能是和idea版本有关系,我的idea版本是2019.1.2版本的,我安装了一个2019.2.4版本的果然解决了。
如果有其他同学发现有更好的解决办法的请评论,留言,相互沟通!

你可能感兴趣的:(Java)