How to generate map.txt using Eclipse?

I read from the developers of the Android page and other pages on the Internet. But I could not find a way to generate map.txt from Eclipse.

If Eclipse generates this file, where does it store it?

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.

+6
source share
2 answers

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

The Ant build process by default allows ProGuard to write the map file as bin/proguard/mapping.txt (when creating the release build).

CFR. Android SDK docs> Development> Tools> ProGuard.

+5
source

Yes, I decided. Just add this line to Proguard.cfg and you will get the Proguard project folder .

 -dump proguard/class_files.txt -printseeds proguard/seeds.txt -printusage proguard/unused.txt -printmapping proguard/mapping.txt 

Hope this helps someone.

0
source

Source: https://habr.com/ru/post/921773/


All Articles