Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate mapping.txt using Eclipse?

I read from Android developers page & other pages on web. But I couldn't find a way to generate mapping.txt from Eclipse.

If Eclipse is generating this file, where is it keeping this?

I have project.properties:

target=android-14
proguard.config=proguard.cfg

And proguard.cfg:

-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);
}

-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}

.project and .classpath.

like image 433
MicroEyes Avatar asked Jul 31 '12 14:07

MicroEyes


People also ask

Where is mapping txt file?

It should be located at build/outputs/proguard/release/mapping. txt in your application module's directory. In the latest version of ProGuard and Android Studio, the file is located at build/outputs/mapping/release/mapping. txt .


1 Answers

The current version of the Eclipse plugin (20.0.0) by default lets ProGuard write out the mapping file as proguard/mapping.txt (when exporting an apk).

The Ant build process by default lets ProGuard write out the mapping file as bin/proguard/mapping.txt (when creating a release build).

Cfr. Android SDK docs > Develop > Tools > ProGuard.

like image 195
Eric Lafortune Avatar answered Oct 10 '22 09:10

Eric Lafortune