在您的 .idea 文件夹内,更改 workspace.xml 文件
添加
<property name="dynamic.classpath" value="true" />
至
<component name="PropertiesComponent">
.
.
.
</component>
例子
<component name="PropertiesComponent">
<property name="project.structure.last.edited" value="Project" />
<property name="project.structure.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.0" />
<property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
<property name="dynamic.classpath" value="true" />
</component>
如果你没有看到任何一个,请随意添加它。 <component name="PropertiesComponent">
<property name="dynamic.classpath" value="true" />
</component>
社区编辑:这个解决方案似乎在较新版本的IDE中不起作用,现在PropertiesComponent
的格式已经变了。如果是这种情况,那么这个答案应该可以解决。
<component name="PropertiesComponent">
标签下,将 <property name="dynamic.classpath" value="true" />
添加到 .idea/workspace.xml
文件中。对我有用。Error running 'MasterFileGenerator':
Command line is too long. Shorten command line for StagingFileGenerator or also for Application default configuration.
user-local default: none - java [options] className [args]
切换为 JAR manifest - java -cp classpath.jar className [args]
。
要使其持久化:
<property name="dynamic.classpath" value="true" />
b)如果有keyToString json,请在地图中添加新行:
"dynamic.classpath": "true"
(请记住上面一行中的逗号)