Confusing small records

Source: Internet
Author: User

Http://www.cnblogs.com/classic/archive/2011/04/27/2030234.html
Http://blog.sina.com.cn/s/blog_83940dfb0100zc5g.html

Http://blog.chinaunix.net/uid-20665441-id-3016262.html
Http://blog.sina.com.cn/s/blog_5a3834930101bgcn.html

# #---------------Begin:proguard configuration common for all Android apps----------
-optimizationpasses 5 #代码进行迭代优化的次数
-dontusemixedcaseclassnames #混淆时不会产生形形色色的类名
-dontskipnonpubliclibraryclasses #指定不去忽略非公共的库类
-dontskipnonpubliclibraryclassmembers #指定不去忽略非公共的库类成员
-dontpreverify #不要预先验证
-verbose #冗长的
-dump class_files.txt #废弃class_files. txt
-printseeds seeds.txt #打印seeds. txt
-printusage unused.txt #打印unused. txt
-printmapping mapping.txt #打印mapping. txt
-optimizations!code/simplification/arithmetic,!field/*,!class/merging/* #优化

-allowaccessmodification
-keepattributes *annotation*
-renamesourcefileattribute sourcefile
-keepattributes sourcefile,linenumbertable
-repackageclasses "

-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
-dontnote Com.android.vending.licensing.ILicensingService

# explicitly preserve all serialization members. The Serializable interface
# is only a marker interface, so it wouldn ' t save them.
-keepclassmembers class * Implements Java.io.Serializable {
Static final long serialversionuid;
private static final java.io.objectstreamfield[] Serialpersistentfields;
private void WriteObject (Java.io.ObjectOutputStream);
private void ReadObject (Java.io.ObjectInputStream);
Java.lang.Object Writereplace ();
Java.lang.Object Readresolve ();
}

# Preserve All native method names and the names of their classes.
-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.);
}

# Preserve static fields of inner classes of R classes, might be accessed
# through introspection.
-keepclassmembers class * *. r$* {
public static <fields>;
}

# Preserve The special static methods that is required in all enumeration classes.
-keepclassmembers enum * {
public static **[] values ();
public static * * VALUEOF (java.lang.String);
}

-keep public class * {
public protected *;
}

-keep class * Implements Android.os.Parcelable {
public static final Android.os.parcelable$creator *;
}
# #---------------End:proguard configuration common for all Android apps----------

# #---------------Begin:proguard configuration for Gson----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature

# Gson Specific Classes
-keep class Sun.misc.Unsafe {*;}
#-keep class com.google.gson.stream.** {*;}

# application classes that'll be serialized/deserialized over Gson
-keep class com.google.gson.examples.android.model.** {*;}

# #---------------End:proguard configuration for Gson----------
# #---------------Begin:proguard configuration for WebView----------
-keepclassmembers class Fqcn.of.javascript.interface.for.webview {
public *;
}
# #---------------End:proguard configuration for WebView----------

Confusing small records

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.