使用proguard导出应用程序时出错

时间:2015-08-11 17:47:40

标签: android proguard

我的应用程序编译完全没有proguard。但是当我尝试使用proguard来混淆我的代码时,我得到一个错误,我无法解决我的生活。

我试过

-dontshrink
-dontoptimize
-dontpreverify

和各种各样的保持无济于事。 我正在使用greenDao库并添加来自greenDao FAQ的建议-keep也没有帮助。以下错误仍然存​​在:

[2015-08-11 22:11:38 - SubClientAndroid] Proguard returned with error code 1. See console
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Configuration
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Configuration
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Configuration
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.DefaultObjectWrapper
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.DefaultObjectWrapper
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Configuration
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Configuration
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Template
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Template
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Template
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Template
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Template
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Template
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Template
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Template
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Template
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Configuration
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Template
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Template
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Template
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Template
[2015-08-11 22:11:38 - SubClientAndroid] Warning: de.greenrobot.daogenerator.DaoGenerator: can't find referenced class freemarker.template.Template
[2015-08-11 22:11:38 - SubClientAndroid] Warning: net.sf.andpdf.crypto.RC4Cipher: can't find referenced class org.bouncycastle.crypto.engines.RC4Engine
[2015-08-11 22:11:38 - SubClientAndroid] Warning: net.sf.andpdf.crypto.RC4Cipher: can't find referenced class org.bouncycastle.crypto.engines.RC4Engine
[2015-08-11 22:11:38 - SubClientAndroid] Warning: net.sf.andpdf.crypto.RC4Cipher: can't find referenced class org.bouncycastle.crypto.engines.RC4Engine
[2015-08-11 22:11:38 - SubClientAndroid] Warning: net.sf.andpdf.crypto.RC4Cipher: can't find referenced class org.bouncycastle.crypto.engines.RC4Engine
[2015-08-11 22:11:38 - SubClientAndroid] Warning: net.sf.andpdf.crypto.RC4Cipher: can't find referenced class org.bouncycastle.crypto.params.KeyParameter
[2015-08-11 22:11:38 - SubClientAndroid] Warning: net.sf.andpdf.crypto.RC4Cipher: can't find referenced class org.bouncycastle.crypto.params.KeyParameter
[2015-08-11 22:11:38 - SubClientAndroid] Warning: net.sf.andpdf.crypto.RC4Cipher: can't find referenced class org.bouncycastle.crypto.engines.RC4Engine
[2015-08-11 22:11:38 - SubClientAndroid] Warning: net.sf.andpdf.crypto.RC4Cipher: can't find referenced class org.bouncycastle.crypto.engines.RC4Engine
[2015-08-11 22:11:38 - SubClientAndroid]       You should check if you need to specify additional program jars.
[2015-08-11 22:11:38 - SubClientAndroid] Warning: there were 30 unresolved references to classes or interfaces.
[2015-08-11 22:11:38 - SubClientAndroid]          You may need to specify additional library jars (using '-libraryjars').
[2015-08-11 22:11:38 - SubClientAndroid] java.io.IOException: Please correct the above warnings first.
[2015-08-11 22:11:38 - SubClientAndroid]    at proguard.Initializer.execute(Initializer.java:321)
[2015-08-11 22:11:38 - SubClientAndroid]    at proguard.ProGuard.initialize(ProGuard.java:211)
[2015-08-11 22:11:38 - SubClientAndroid]    at proguard.ProGuard.execute(ProGuard.java:86)
[2015-08-11 22:11:38 - SubClientAndroid]    at proguard.ProGuard.main(ProGuard.java:492)

1 个答案:

答案 0 :(得分:2)

尝试-dontwarn选项。

-dontwarn org.bouncycastle.crypto.**
-dontwarn freemarker.template.**