android - Error while generating signed apk -


i got old project , keystore file , when trying create signed apk give following error.

   [2013-05-19 12:36:02 - xxxxxxx] proguard returned error code 1. see console    [2013-05-19 12:36:02 - xxxxxxx] unable access jarfile /users/muhammadali/documents/development    [2013-05-19 12:36:12 - xxxxxx] proguard returned error code 1. see console     [2013-05-19 12:36:12 - xxxxxx] unable access jarfile /users/muhammadali/documents/development 

please why cant generate apk file.

alright, few things:

  1. make sure proguard version 4.8 , above. there known bug caused in 4.7.

  2. assuming running latest version of proguard , still occuring, go [android-sdk-folder]/sdk/tools/proguard/bin/proguard.sh , make following changes:

    change:

    java -jar $proguard_home/lib/proguard.jar "$@" 

    to:

    java -jar "$proguard_home/lib/proguard.jar" "$@" 
  3. add line project.properties file in application folder.

    proguard.config=proguard.cfg 
  4. create proguard.cfg file in application folder.

  5. populate proguard.cfg file below (modify needed).

    -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*  -keep public class * extends android.app.activity -keep public class * extends android.app.application -keep public class * extends android.app.service -keep public class * extends android.content.broadcastreceiver -keep public class * extends android.content.contentprovider -keep public class * extends android.app.backup.backupagenthelper -keep public class * extends android.preference.preference -keep public class com.android.vending.licensing.ilicensingservice  -keepclasseswithmembernames class * {     native <methods>; }  -keepclasseswithmembers class * {     public <init>(android.content.context, android.util.attributeset); }  -keepclasseswithmembers class * {     public <init>(android.content.context, android.util.attributeset, int); }  -keepclassmembers class * extends android.app.activity {    public void *(android.view.view);    public void onsearchbuttonclicked(java.lang.string); }  -keepclassmembers enum * {     public static **[] values();     public static ** valueof(java.lang.string); }  -keep class * implements android.os.parcelable {    public static final android.os.parcelable$creator *; } 
  6. turn project -> build automatically off go menu project -> clean... , clean project first.

good luck! i'll happy out try steps above , go through it.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -