Proguard returned with error code 1. See console : java.lang.OutOfMemoryError

如果项目比较大代码较多,在打包时,可能会出现

java.lang.OutOfMemoryError: Java heap space

解决方法:\sdk\tools\proguard\bin\proguard.bat

java -jar "%PROGUARD_HOME%"\lib\proguard.jar %* 

添加-Xmx1024m -Xms1024m参数,调高JVM 的使用内存;即变成

java -Xmx1024m -Xms1024m -jar "%PROGUARD_HOME%"\lib\proguard.jar %*
[2014-11-11 14:05:50 - xxx] Proguard returned with error code 1. See console
[2014-11-11 14:05:50 - xxx] Note: there were 3040 duplicate class definitions.
[2014-11-11 14:05:50 - xxx] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
[2014-11-11 14:05:50 - xxx] 	at java.util.Arrays.copyOfRange(Arrays.java:3209)
[2014-11-11 14:05:50 - xxx] 	at java.lang.String.<init>(String.java:216)
[2014-11-11 14:05:50 - xxx] 	at proguard.classfile.constant.Utf8Constant.getStringRepresentation(Utf8Constant.java:283)
[2014-11-11 14:05:50 - xxx] 	at proguard.classfile.constant.Utf8Constant.switchToStringRepresentation(Utf8Constant.java:174)
[2014-11-11 14:05:50 - xxx] 	at proguard.classfile.constant.Utf8Constant.getString(Utf8Constant.java:128)
[2014-11-11 14:05:50 - xxx] 	at proguard.classfile.ProgramClass.getString(ProgramClass.java:116)
[2014-11-11 14:05:50 - xxx] 	at proguard.classfile.constant.NameAndTypeConstant.getType(NameAndTypeConstant.java:104)
[2014-11-11 14:05:50 - xxx] 	at proguard.classfile.ProgramClass.getType(ProgramClass.java:164)
[2014-11-11 14:05:50 - xxx] 	at proguard.classfile.constant.RefConstant.getType(RefConstant.java:103)
[2014-11-11 14:05:50 - xxx] 	at proguard.classfile.util.ClassReferenceInitializer.visitAnyRefConstant(ClassReferenceInitializer.java:195)
[2014-11-11 14:05:50 - xxx] 	at proguard.classfile.util.SimplifiedVisitor.visitAnyMethodrefConstant(SimplifiedVisitor.java:192)
[2014-11-11 14:05:50 - xxx] 	at proguard.classfile.util.SimplifiedVisitor.visitMethodrefConstant(SimplifiedVisitor.java:204)
[2014-11-11 14:05:50 - xxx] 	at proguard.classfile.constant.MethodrefConstant.accept(MethodrefConstant.java:69)
[2014-11-11 14:05:50 - xxx] 	at proguard.classfile.ProgramClass.constantPoolEntriesAccept(ProgramClass.java:445)
[2014-11-11 14:05:50 - xxx] 	at proguard.classfile.util.ClassReferenceInitializer.visitProgramClass(ClassReferenceInitializer.java:97)
[2014-11-11 14:05:50 - xxx] 	at proguard.classfile.ProgramClass.accept(ProgramClass.java:346)
[2014-11-11 14:05:50 - xxx] 	at proguard.classfile.ClassPool.classesAccept(ClassPool.java:116)
[2014-11-11 14:05:50 - xxx] 	at proguard.Initializer.execute(Initializer.java:98)
[2014-11-11 14:05:50 - xxx] 	at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-11-11 14:05:50 - xxx] 	at proguard.ProGuard.execute(ProGuard.java:86)
[2014-11-11 14:05:50 - xxx] 	at proguard.ProGuard.main(ProGuard.java:492)

时间: 2024-10-11 22:46:29

Proguard returned with error code 1. See console : java.lang.OutOfMemoryError的相关文章

(转)Android打包失败Proguard returned with error code 1. See console

原文地址:http://www.cnblogs.com/snake-hand/p/3161438.html 问题一: [2013-06-28 11:12:10 - ] Proguard returned with error code 1. See console [2013-06-28 11:12:10 - ] Note: there were 1 duplicate class definitions. [2013-06-28 11:12:10 - ] Warning: android.su

Android混淆时出现的proguard returned with error code 1.See console问题

最近使用项目进行Android的混淆处理,工程中加入了多个第三方的jar包,直接使用project.properties中的proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt进行混淆处理,打包APK的时候出现了proguard returned with error code 1.See console,上网查了一下出现这类问题的原因,主要介绍了三种方式,分别是Error: C:/

混淆时报:Proguard returned with error code 1. See console

发生这个错误是因为打包混淆时找不到我们的引用包,有的人可能说我没有引用什么Library啊,事实上,我们现在的项目创建时就默认有v4包,这是google提供的兼容包,主要为了应对Android3.0以后的新组建也可以在3.0之前使用,例如Fragment,ViewPager等等,好了,现在我们回到正题,问题我们知道了,解决办法随之而来,我们在proguard-project.txt文件(2.3左右android版本应该是proguard.cfg文件)中添加以下语句: [java] view pl

[转]ubuntu错误解决E: Sub-process /usr/bin/dpkg returned an error code (1)

http://yanue.net/post-123.html 在用apt-get安装软件时出现了类似于install-info: No dir file specified; try –help for more information.dpkg:处理 gettext (–configure)时出错: 子进程 post-installation script 返回了错误号 1 在处理时有错误发生:findutilsE: Sub-process /usr/bin/dpkg returned an

ubuntu 下出现E: Sub-process /usr/bin/dpkg returned an error code

在用apt-get安装软件时出现了类似于 install-info: No dir file specified; try –help for more information.dpkg:处理 gettext (–configure)时出错: 子进程 post-installation script 返回了错误号 1 在处理时有发生错误: findutils E: Sub-process /usr/bin/dpkg returned an error code (1) 第一种方法: sudo m

Sub-process /usr/bin/dpkg returned an error code (1) 解决方法

最近在debian系统上apt-get install -y ia32-libs安装软件到最后时总是出现如下错误: Sub-process /usr/bin/dpkg returned an error code (1) 解决办法: cd /var/lib/dpkg sudo mv info info.bak sudo mkdir info sudo apt-get install -y ia32-libs 开始我是想在一条命令中同时安装几个软件包,结果还是出现E: Sub-process /u

【转】E: Sub-process /usr/bin/dpkg returned an error code (1)

原链接: jaryWang:E: Sub-process /usr/bin/dpkg returned an error code (1)错误解决 1.$ sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_old //现将info文件夹更名 2.$ sudo mkdir /var/lib/dpkg/info //再新建一个新的info文件夹3.$ sudo apt-get update, $ apt-get -f install //不用解释了吧4.$ 

upgrade jessie时出现E: Sub-process /usr/bin/dpkg returned an error code (1)错误的解决办法

执行apt-get dist-upgrade时出现"E: Sub-process /usr/bin/dpkg returned an error code (1)",新内核就是不能完成设置,解决办法如下: cd /var/lib/dpkg mv info infobak;mkdir info 然后重新来过就没问题了.

ubuntu错误解决E: Sub-process /usr/bin/dpkg returned an error code (1)

在用apt-get安装软件时出现了类似于 install-info: No dir file specified; try –help for more information.dpkg:处理 gettext (–configure)时出错: 子进程 post-installation script 返回了错误号 1 在处理时有错误发生: findutils E: Sub-process /usr/bin/dpkg returned an error code (1) 办法如下: sudo mv