0

我真的需要帮助,我的安卓应用程序。使用拥有 3 个 sherlockListFragments 的 sherlockActivity,我的最小 sdk req。是 2.2 ,当我在模拟器上运行它时它运行完美,但在真实设备上(在 2.2 上运行)它会强制关闭。经过数小时的搜索,我编辑了我的 proguard-project.txt 和 project.properties,并将我的 android 开发人员工具包级别更新为 20.1,我下载了 proguard 4.9 并将 jars 放入我的 sdk/tools/lib 目录中。然后我导出到.apk文件,但它给了我相同的结果:(((这是proguard-project.txt

-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontwarn android.support.**
-verbose

-dontoptimize
-dontpreverify


-keepattributes *Annotation* 
-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.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService
-keep public class * extends android.support.v4.app.Fragment
-keep public class * extends android.app.Fragment

-keep class android.support.v4.app.**{*;}
-keep interface android.support.v4.app.**{*;}

-keep class com.actionbarsherlock.**{*;}
-keep interface com.actionbarsherlock.**{*;}

-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 public class * extends android.view.View {
  void set*(***);
  *** get*();
 }

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

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

-keepclassmembers class **.R$* {
  public static <fields>;
}

在我的 project.properties 文件中,我删除了 proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 的注释

请我需要详细的帮助,因为我是 android 新手 在此先感谢

4

0 回答 0