转自:http://t.csdn.cn/LwcdI
错误原因Error running ‘MallTest.testRun’: Command line is too long. Shorten command line for MallTest.testRun.
错误运行的测试。命令行太长。缩短命令行。
出现这个的原因一般是因为项目需要打印的环境变量太长,超过了限制,需要你缩短命令行来解决问题。
解决办法-
修改运行配置Configurations,将默认的Shorten command line的值user-local default 改为 JAR mainifest 或者 classpath file
这种办法每次需要对每个类单独设置。
-
在项目的.idea/workspace.xml文件中,找到
,后面在添加一行
这种方式一次设置就行。



