java - Proguard returned with error code 1 error when signing apk with many external libraries -
i using eclipse mac. when want export signed apk "proguard returned error code 1. see console" error.
- i have these 2 files in project root folder: "proguard-android.txt" , "project.properties"
inside project.properties have:
target=android-17 proguard.config=proguard-project.txt android.library.reference.1=../google-play-services_lib android.library.reference.2=../facebooksdk
among many other warnings when try create signed apk, get:
com.my.app.va.debug.configurelog4j: can't find referenced class de.mindpipe.android.logging.log4j.logconfigurator com.my.app.va.debug.hockeyapphelper: can't find referenced class net.hockeyapp.android.exceptionhandler
i put these lines inside "proguard-android.txt" , errors persist:
-keep public class de.mindpipe.android.logging.** -dontwarn de.mindpipe.android.logging.** -keep public class net.hockeyapp.** -dontwarn net.hockeyapp.**
what doing wrong?
update: have changed filename "proguard-android.txt" "proguard-project" , added proguard, , "referenced class" error messages gone:
-dontwarn de.mindpipe.android.** -keep public class de.mindpipe.android.** -dontwarn net.hockeyapp.android.** -keep public class net.hockeyapp.android.**
neverthless... actual solution? or, hiding problem?
other warnings still persist:
warning: com.facebook.widget.usersettingsfragment: can't find referenced method 'android.support.v4.app.fragmentactivity getactivity()' in class com.facebook.widget.usersettingsfragment warning: there 138 unresolved references program class members.
the proguard file name should defined in project.properties if using eclipse or in build.gradle if using gradle or android studio.
it contains proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt.
you should include following:
-keep class android.support.v4.app.** { *; } -keep interface android.support.v4.app.** { *; }
more official info @ http://developer.android.com/tools/help/proguard.html.
some other relevant stackoverflow discussions: how config proguard-project.txt file remove logs , how automatically generate proguard-android.txt?
Comments
Post a Comment