Proguard error if i use itext Library jar

落爺英雄遲暮 提交于 2019-12-04 06:37:46

try with these two lines:

-keep class org.spongycastle.** { *; }
-dontwarn org.spongycastle.**

Your logcat is already saying:

If your code works fine without the missing classes, you can suppress the warnings with '-dontwarn' options.

This works fine for itextg-5.5.10

# proguard configuration for iText

-keep class org.spongycastle.** { *; }
-dontwarn org.spongycastle.**

-keep class com.itextpdf.** { *; }

-keep class javax.xml.crypto.dsig.** { *; }
-dontwarn javax.xml.crypto.dsig.**

-keep class org.apache.jcp.xml.dsig.internal.dom.** { *; }
-dontwarn org.apache.jcp.xml.dsig.internal.dom.**

-keep class javax.xml.crypto.dom.** { *; }
-dontwarn javax.xml.crypto.dom.**

-keep class org.apache.xml.security.utils.** { *; }
-dontwarn org.apache.xml.security.utils.**

-keep class javax.xml.crypto.XMLStructure
-dontwarn javax.xml.crypto.XMLStructure

I used Image to add in Table and I got error like NoSuchMethodFound:

I added following lines in proguard, its working fine now.

-keep class org.spongycastle.** { *; }
-dontwarn org.spongycastle.**

-keep class com.itextpdf.text.** { *; }
-dontwarn com.itextpdf.text.**

Thank you.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!