Skip to content Skip to sidebar Skip to footer

Getting Error While Generating The .apk File If Proguard Is On

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.cordova.CameraLauncher:

Solution 1:

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

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

Solution 2:

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

-keep publicclass * extends com.phonegap.api.Plugin 
-keep publicclass * extends org.apache.cordova.api.Plugin 
-keep publicclassorg.apache.cordova.DroidGap 
-keep publicclassorg.apache.cordova.** 
-libraryjars libs/commons-codec-1.7.jar
-dontwarn android.webkit.*
-dontwarn org.apache.**

Post a Comment for "Getting Error While Generating The .apk File If Proguard Is On"