Android project: Export proble Launch canceled! Proguard returned with error code 1. See console -
i un-commented below line in project.prperties
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
to work progard , working fine.
but when added android-support-v4.jar library, got error while exporting signed application project
launch canceled! proguard returned error code 1. see console note: there 316 duplicate class definitions. warning: com.google.android.gms.common.images.imagemanager$a: can't find superclass or interface android.content.componentcallbacks2 warning: com.google.android.gms.maps.mapfragment: can't find superclass or interface android.app.fragment warning: com.google.android.gms.common.googleplayservicesutil: can't find referenced field 'int smallestscreenwidthdp' in class android.content.res.configuration warning: com.google.android.gms.common.images.imagemanager: can't find referenced method 'void registercomponentcallbacks(android.content.componentcallbacks)' in class android.content.context warning: com.google.android.gms.common.images.imagemanager$a: can't find referenced class android.content.componentcallbacks2 warning: com.google.android.gms.maps.mapfragment: can't find referenced class android.app.fragment warning: com.google.android.gms.maps.mapfragment: can't find referenced class android.app.fragment warning: com.google.android.gms.maps.mapfragment: can't find referenced class android.app.fragment warning: com.google.android.gms.maps.mapfragment: can't find referenced class android.app.fragment warning: com.google.android.gms.maps.mapfragment: can't find referenced class android.app.fragment warning: com.google.android.gms.maps.mapfragment: can't find referenced class android.app.fragment warning: com.google.android.gms.maps.mapfragment: can't find referenced class android.app.fragment warning: com.google.android.gms.maps.mapfragment: can't find referenced class android.app.fragment warning: com.google.android.gms.maps.mapfragment: can't find referenced class android.app.fragment warning: com.google.android.gms.maps.mapfragment: can't find referenced class android.app.fragment warning: com.google.android.gms.maps.mapfragment: can't find referenced class android.app.fragment warning: com.google.android.gms.maps.mapfragment: can't find referenced class android.app.fragment warning: com.google.android.gms.maps.mapfragment$a: can't find referenced class android.app.fragment warning: com.google.android.gms.maps.mapfragment$a: can't find referenced class android.app.fragment warning: com.google.android.gms.maps.mapfragment$b: can't find referenced class android.app.fragment warning: com.google.android.gms.maps.mapfragment$b: can't find referenced class android.app.fragment warning: com.google.android.gms.maps.mapfragment$b: can't find referenced class android.app.fragment warning: com.google.android.gms.maps.mapfragment$b: can't find referenced class android.app.fragment should check if need specify additional program jars. warning: there 21 unresolved references classes or interfaces. may need specify additional library jars (using '-libraryjars'). warning: there 2 unresolved references program class members. input classes appear inconsistent. may need recompile them , try again. alternatively, may have specify option '-dontskipnonpubliclibraryclassmembers'. java.io.ioexception: please correct above warnings first. @ proguard.initializer.execute(initializer.java:321) @ proguard.proguard.initialize(proguard.java:211) @ proguard.proguard.execute(proguard.java:86) @ proguard.proguard.main(proguard.java:492)
i tried adding below lines proguard-project.txt not working
-dontwarn android.support.** -dontwarn com.google.ads.** -libraryjars libs/android-support-v4.jar -keep public class * extends com.phonegap.api.plugin -keep public class org.apache.cordova.droidgap -keep public class org.apache.cordova.** -dontwarn android.webkit.* -dontwarn org.apache.** -dontwarn android.support.v7.widget.** -keep class android.support.v7.widget.** { *; } -dontwarn com.google.ads.** -keep class com.google.ads.** {*;} -keep class com.google.android.gms.analytics.** -keep class com.google.analytics.tracking.** -dontwarn com.google.android.gms.analytics.** -dontwarn com.google.analytics.tracking.** -keep class com.google.ads.** { *; } -dontwarn com.google.ads.** -keep public class com.admob.android.ads.** {*;}
i found answer myself. adding below 2 lines in proguard-project.txt file solved problem.
-dontwarn com.google.android.gms.* -ignorewarnings
Comments
Post a Comment