我的应用已经构建并成功运行,然后我启用了Proguard,现在应用程序在启动时立即崩溃。没有构建错误,只有运行时/启动崩溃。我使用的是Android Studio 1.1.0。目标API 22,分14。
如何跟踪Proguard在启动时使应用程序崩溃的行为?我找到了输出文件的位置,但我不知道该找什么。我在网上搜索了几十个Proguard提示,但到目前为止没有任何帮助。以下是我的proguard.cfg:
-dontpreverify
-repackageclasses ''
-allowaccessmodification
-optimizations !code/simplification/arithmetic
-keepattributes *Annotation*,SourceFile,LineNumberTable,InnerClasses,Exceptions,EnclosingMethod
-renamesourcefileattribute SourceFile
-dontwarn com.facebook.**
-dontwarn com.httpmime.**
-dontwarn com.parse.**
-keep class UserLoginTask
-keep class UserPasswordRecoveryTask
-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.pictureplay.BitmapWorkerTask
-keep public class com.pictureplay.App
-keep public class com.pictureplay.DrawingView
-keep public class com.pictureplay.Exif_Reader
-keep public class com.android.vending.licensing.ILicensingService
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keep public class * extends android.os.AsyncTask<Void, Void, Boolean>
-keep class com.pictureplay.LoginActivity { *; }
-keep class com.pictureplay.LoginActivity$UserLoginTask { *; }
-keep class com.pictureplay.LoginActivity$UserPasswordRecoveryTask { *; }
-keepclassmembers class com.pictureplay.UserLoginTask**
-keepclassmembers class com.pictureplay.UserPasswordRecoveryTask** { *; }
-keepclasseswithmembernames class * {
Boolean doInBackground(...);
void onPostExecute*(...);
}
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclassmembers public class * extends android.view.View {
void set*(***);
*** get*();
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-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.content.Context {
public void *(android.view.View);
public void *(android.view.MenuItem);
}
-keepclassmembers class * implements android.os.Parcelable {
static android.os.Parcelable$Creator CREATOR;
}
-keepclassmembers class **.R$* {
public static <fields>;
}
-assumenosideeffects class android.util.Log {
public static *** d(...);
}