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

前端 未结 2 1327
挽巷
挽巷 2021-02-06 19:06

I am using proguard to obfuscate the code. I am getting the following error in console

Proguard returned with error code 1. See console
Warning: org.apache.cordo         


        
2条回答
  •  情深已故
    2021-02-06 19:24

    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.**
    

提交回复
热议问题