java - ProGuard and HoloEverywhere: Export Signed Application Errors -
i'm using actionbarsherlock , holoeverywhere in project. works perfectly, except when try export signed application, proguard gives me grief:
[2013-05-19 00:13:53 - ] proguard returned error code 1. see console [2013-05-19 00:13:53 - ] warning: com.actionbarsherlock.widget.suggestionsadapter: can't find referenced field 'android.content.context mcontext' in class com.actionbarsherlock.widget.suggestionsadapter [2013-05-19 00:13:53 - ] warning: com.actionbarsherlock.widget.suggestionsadapter: can't find referenced method 'android.database.cursor getcursor()' in class com.actionbarsherlock.widget.suggestionsadapter [2013-05-19 00:13:53 - ] warning: com.actionbarsherlock.widget.suggestionsadapter: can't find referenced field 'android.database.cursor mcursor' in class com.actionbarsherlock.widget.suggestionsadapter [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.chooseractivity: can't find referenced method 'android.content.intent getintent()' in class org.holoeverywhere.chooseractivity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.chooseractivity: can't find referenced method 'void finish()' in class org.holoeverywhere.chooseractivity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.chooseractivity: can't find referenced method 'android.content.res.resources getresources()' in class org.holoeverywhere.chooseractivity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.thememanager: can't find referenced method 'android.content.intent getintent()' in class org.holoeverywhere.app.activity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.thememanager: can't find referenced method 'boolean isrestricted()' in class org.holoeverywhere.app.activity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.thememanager: can't find referenced method 'boolean isfinishing()' in class org.holoeverywhere.app.activity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.thememanager: can't find referenced method 'void finish()' in class org.holoeverywhere.app.activity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.thememanager: can't find referenced method 'void overridependingtransition(int,int)' in class org.holoeverywhere.app.activity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.activity: can't find referenced method 'android.content.intent getintent()' in class org.holoeverywhere.app.activity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.activity: can't find referenced method 'android.content.res.resources getresources()' in class org.holoeverywhere.app.activity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.activity: can't find referenced method 'android.view.window getwindow()' in class org.holoeverywhere.app.activity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.activity: can't find referenced method 'java.lang.classloader getclassloader()' in class org.holoeverywhere.app.activity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.activity$24: can't find referenced method 'boolean requestwindowfeature(int)' in class org.holoeverywhere.app.activity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.alertactivity: can't find referenced method 'void finish()' in class org.holoeverywhere.app.alertactivity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.alertactivity: can't find referenced method 'boolean isfinishing()' in class org.holoeverywhere.app.alertactivity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.alertactivity: can't find referenced method 'android.view.window getwindow()' in class org.holoeverywhere.app.alertactivity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.alertactivity: can't find referenced method 'boolean onkeydown(int,android.view.keyevent)' in class org.holoeverywhere.app.activity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.alertactivity: can't find referenced method 'boolean onkeyup(int,android.view.keyevent)' in class org.holoeverywhere.app.activity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.dialogfragment: can't find referenced method 'android.support.v4.app.fragmentmanager getfragmentmanager()' in class org.holoeverywhere.app.dialogfragment [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.dialogfragment: can't find referenced method 'android.support.v4.app.fragmentactivity getactivity()' in class org.holoeverywhere.app.dialogfragment [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.dialogfragment: can't find referenced method 'void onactivitycreated(android.os.bundle)' in class org.holoeverywhere.app.fragment [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.dialogfragment: can't find referenced method 'android.view.view getview()' in class org.holoeverywhere.app.dialogfragment [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.dialogfragment: can't find referenced method 'void ondetach()' in class org.holoeverywhere.app.fragment [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.dialogfragment: can't find referenced method 'void onsaveinstancestate(android.os.bundle)' in class org.holoeverywhere.app.fragment [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.dialogfragment: can't find referenced method 'void onstart()' in class org.holoeverywhere.app.fragment [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.dialogfragment: can't find referenced method 'void onstop()' in class org.holoeverywhere.app.fragment [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.dialogfragment: can't find referenced method 'java.lang.charsequence gettext(int)' in class org.holoeverywhere.app.dialogfragment [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.expandablelistactivity: can't find referenced method 'void onrestoreinstancestate(android.os.bundle)' in class org.holoeverywhere.app.activity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.fragment: can't find referenced method 'void setarguments(android.os.bundle)' in class org.holoeverywhere.app.fragment [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.gridfragment: can't find referenced method 'android.view.view getview()' in class org.holoeverywhere.app.gridfragment [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.gridfragment: can't find referenced method 'android.support.v4.app.fragmentactivity getactivity()' in class org.holoeverywhere.app.gridfragment [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.listactivity: can't find referenced method 'void onrestoreinstancestate(android.os.bundle)' in class org.holoeverywhere.app.activity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.listfragment: can't find referenced method 'android.view.view getview()' in class org.holoeverywhere.app.listfragment [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.listfragment: can't find referenced method 'android.support.v4.app.fragmentactivity getactivity()' in class org.holoeverywhere.app.listfragment [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.resolveractivity: can't find referenced method 'android.content.res.resources getresources()' in class org.holoeverywhere.app.resolveractivity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.resolveractivity: can't find referenced method 'android.content.intent getintent()' in class org.holoeverywhere.app.resolveractivity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.resolveractivity: can't find referenced method 'android.content.pm.packagemanager getpackagemanager()' in class org.holoeverywhere.app.resolveractivity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.resolveractivity: can't find referenced method 'java.lang.string getpackagename()' in class org.holoeverywhere.app.resolveractivity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.resolveractivity: can't find referenced method 'void finish()' in class org.holoeverywhere.app.resolveractivity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.resolveractivity: can't find referenced method 'void onrestoreinstancestate(android.os.bundle)' in class org.holoeverywhere.app.alertactivity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.resolveractivity: can't find referenced method 'boolean ischangingconfigurations()' in class org.holoeverywhere.app.resolveractivity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.resolveractivity$resolvelistadapter: can't find referenced method 'void finish()' in class org.holoeverywhere.app.resolveractivity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.resolveractivity$resolvelistadapter: can't find referenced method 'android.content.pm.packagemanager getpackagemanager()' in class org.holoeverywhere.app.resolveractivity [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.tabswipeactivity: can't find referenced method 'boolean isdetached()' in class org.holoeverywhere.app.tabswipeactivity$innerfragment [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.tabswipefragment: can't find referenced method 'java.lang.charsequence gettext(int)' in class org.holoeverywhere.app.tabswipefragment [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.tabswipefragment: can't find referenced method 'void notifydatasetchanged()' in class org.holoeverywhere.app.tabswipefragment$tabswipeadapter [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.app.tabswipefragment$tabswipeadapter: can't find referenced method 'android.support.v4.app.fragmentmanager getchildfragmentmanager()' in class org.holoeverywhere.app.tabswipefragment [2013-05-19 00:13:53 - ] warning: org.holoeverywhere.internal.alertcontroller$alertparams$2: can't find referenced method 'android.database.cursor getcursor()' in class org.holoeverywhere.internal.alertcontroller$alertparams$2 [2013-05-19 00:13:53 - ] should check if need specify additional program jars. [2013-05-19 00:13:53 - ] warning: there 51 unresolved references program class members. [2013-05-19 00:13:53 - ] input classes appear inconsistent. [2013-05-19 00:13:53 - ] may need recompile them , try again. [2013-05-19 00:13:53 - ] alternatively, may have specify option [2013-05-19 00:13:53 - ] '-dontskipnonpubliclibraryclassmembers'. [2013-05-19 00:13:53 - ] java.io.ioexception: please correct above warnings first. [2013-05-19 00:13:53 - ] @ proguard.initializer.execute(initializer.java:321) [2013-05-19 00:13:53 - ] @ proguard.proguard.initialize(proguard.java:211) [2013-05-19 00:13:53 - ] @ proguard.proguard.execute(proguard.java:86) [2013-05-19 00:13:53 - ] @ proguard.proguard.main(proguard.java:492)
i tried including following lines in proguard-project.txt, didn't seem anything:
-keep class com.actionbarsherlock.** {*;} -keep class org.holoeverywhere.** {*;}
this project.properties:
# file automatically generated android tools. # not modify file -- changes erased! # # file must checked in version control systems. # # customize properties used ant build system edit # "ant.properties", , override values adapt script # project structure. # # enable proguard shrink , obfuscate code, uncomment (available properties: sdk.dir, user.home): proguard.config=${sdk.dir}\\tools\\proguard\\proguard-android.txt:proguard-project.txt # project target. target=android-17 android.library.reference.1=../../../downloads/jakewharton-actionbarsherlock-4.3.1-0-gc0d437c/jakewharton-actionbarsherlock-071a61c/actionbarsherlock android.library.reference.2=../../../downloads/holoeverywhere-master (1)/holoeverywhere-master/library
this proguard-project.txt
# enable proguard in project, edit project.properties # define proguard.config property described in file. # # add project specific proguard rules here. # default, flags in file appended flags specified # in ${sdk.dir}/tools/proguard/proguard-android.txt # can edit include path , order changing proguard # include property in project.properties. # # more details, see # http://developer.android.com/guide/developing/tools/proguard.html # add project specific keep options here: # if project uses webview js, uncomment following # , specify qualified class name javascript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} -keep class com.actionbarsherlock.** -keep class org.holoeverywhere.**
anyone know how fix this?
i needed add following 2 lines:
-libraryjars adt-bundle-windows-x86_64/sdk/platforms/android-17/android.jar -libraryjars adt-bundle-windows-x86_64/sdk/extras/android/support/v4/android-support-v4.jar
Comments
Post a Comment