Getting error while generating the .apk file if proguard is ON

瘦欲@ 提交于 2019-12-03 04:03:53

I fixed it by adding this in my proguard-project.txt

-keep public class * extends com.phonegap.api.Plugin 
-keep public class org.apache.cordova.DroidGap 
-keep public class org.apache.cordova.** 
-libraryjars /Users/Nasir/Desktop/libs/commons-codec.jar
-dontwarn android.webkit.*

You can add the following to your proguard-project.txt. It worked for me on Cordova (PhoneGap) 2.1:

-keep public class * extends com.phonegap.api.Plugin 
-keep public class * extends org.apache.cordova.api.Plugin 
-keep public class org.apache.cordova.DroidGap 
-keep public class org.apache.cordova.** 
-libraryjars libs/commons-codec-1.7.jar
-dontwarn android.webkit.*
-dontwarn org.apache.**
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!