Proguard returned with error code 1. See console Warning: org.apache.cordova.CameraLauncher: can't find referenced class org.apache.commons.codec.binary.Base64 Warning: org.apache.cordova.CameraLauncher: can't find referenced class org.apache.commons.codec.binary.Base64 Warning: org.apache.cordova.CordovaWebView: can't find referenced method 'WebView(android.content.Context,android.util.AttributeSet,int,boolean)' in class android.webkit.WebView Warning: org.apache.cordova.CordovaWebViewClient: can't find referenced method 'android.webkit.WebResourceResponse shouldInterceptRequest(android.webkit.WebView,java.lang.String)' in class android.webkit.WebViewClient Warning: org.apache.cordova.CordovaWebViewClient: can't find referenced class android.webkit.WebResourceResponse Warning: org.apache.cordova.CordovaWebViewClient: can't find referenced class android.webkit.WebResourceResponse Warning: org.apache.cordova.CordovaWebViewClient: can't find referenced class android.webkit.WebResourceResponse Warning: org.apache.cordova.CordovaWebViewClient: can't find referenced class android.webkit.WebResourceResponse Warning: org.apache.cordova.CordovaWebViewClient: can't find referenced class android.webkit.WebResourceResponse Warning: org.apache.cordova.FileUtils: can't find referenced class org.apache.commons.codec.binary.Base64 Warning: org.apache.cordova.FileUtils: can't find referenced class org.apache.commons.codec.binary.Base64 Warning: there were 9 unresolved references to classes or interfaces. You may need to specify additional library jars (using '-libraryjars'). Warning: there were 2 unresolved references to program class members. Your input classes appear to be inconsistent. You may need to recompile them and try again. Alternatively, you may have to specify the option '-dontskipnonpubliclibraryclassmembers'. java.io.IOException: Please correct the above warnings first. at proguard.Initializer.execute(Initializer.java:321) at proguard.ProGuard.initialize(ProGuard.java:211) at proguard.ProGuard.execute(ProGuard.java:86) at proguard.ProGuard.main(ProGuard.java:492)It can be resolved by adding the following lines to your proguard.cfg file:
-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 /Path/To/PhoneGap/libs/commons-codec.jar
-dontwarn android.webkit.*
7 comments:
The pleasure is all mine Simon :D
Thank you Simon, this code fixed an export problem with plugin classes not being included in the final apk.
I think the latest android-bundle renamed that file to proguard-projects.txt
and now the latest version of phonegap ..the file to be edited is: proguard-android-optimize.txt
Thank you Simon.I have I just one question...is there a some plugin for cordova/phonegap which can discover all device connected on (my) local wifi network
@Sabiha Zirić
I'm not aware of any such plugin. The code required to do this is possible but not very portable between OS's.
cordova proguard plugin: https://github.com/greybax/cordova-plugin-proguard
Post a Comment