startup failed:
General error during class generation: The max number of supported arguments is 255, but found 6622
java.lang.IllegalArgumentException: The max number of supported arguments is 255, but found 6622
at org.codehaus.groovy.classgen.asm.CallSiteWriter.getCreateArraySignature(CallSiteWriter.java:74)
at
1 error
Build file '/Users/mintymac02/Documents/Android_Client_Trunk/trunk/Client/Temp/gradleOut/build.gradle'
General error during class generation: Class too large: _BuildScript_$_run_closure3$_closure9
groovyjarjarasm.asm.ClassTooLargeException: Class too large: _BuildScript_$_run_closure3$_closure9
解决方法(1):讲将build.gradle中此处多余的文件删除
解决方法(2):
2.1
Build Setting–>Publishing Setting–>Build --Custom Gradle Template勾选上,
这时候会自动生成Plugins/Android下mainTemplate,打开这个文件
2.2
修改mainTemplate
原因:
(1)aaptOptions.noCompress数组的最大容量为255,也即可以不经压缩打到apk包里的资源文件数不能超过255个。也可以将多余的 STREAMING_ASSETS (含义为StreamingAssets文件夹下所有资源都不压缩)去掉,改为只针对某些类型的资源不压缩,比如.bundle
(2)jar库文件重复引用:
Error: Program type already present: android.support.v4.app.BackStackState
由于某些.aar文件中包含了库,(aar是由jar和bundle组合而成),导致重复,所以删除一个就ok了