当前位置: 代码迷 >> Android >> 新建Android程序的时分发生了找不到 \android-sdk-windows\tools\lib\proguard.cfg
  详细解决方案

新建Android程序的时分发生了找不到 \android-sdk-windows\tools\lib\proguard.cfg

热度:164   发布时间:2016-05-01 14:40:47.0
新建Android程序的时候发生了找不到 \android-sdk-windows\tools\lib\proguard.cfg

网上看到的,自己用过了,绝对完美。

原因:

SDK不完整。?

解决方法:

可在?\android-sdk-windows\tools\lib\目录下新建一个proguard.cfg文件

然后添下以下内容:

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

?

  相关解决方案