我正在使用默认的 Eclipse 安装来签署和发布应用程序。我没有弄乱 default.properties 文件或 proguard.cfg 文件,但是当我在 Developer Console 上查看堆栈跟踪时,行号仍然关闭。所以看起来我的代码仍然有点模糊。我阅读了 ProGuard 文档,并尝试查找应该在 /proguard 中的 mapping.txt 文件,但在那里或 bin 中没有找到这样的文件夹。
这里发生了什么?有什么办法可以阻止它自动混淆,或者至少让我有一个 mappings.txt 文件?我会很感激任何见解。这是我的 default.properties 文件的内容:
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "build.properties", and override values to adapt the script to your
# project structure.
# Project target.
target=android-7
这是我自动生成的 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 com.android.vending.licensing.ILicensingService
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}