One minute to fix your confusion encryption

Source: Internet
Author: User

A recent project found that the confusion before the encryption was bad. Summed up the past is useful for everyone

Nonsense less to say directly on the steps. (Put the elephant in the refrigerator)

Please refer to this article for unlimited reference: http://blog.csdn.net/wanghao200906/article/details/45335981

1. See the picture below


There should be two of these files. Anyway, I'm not config.cfg. They say it's online. I'm free.

2. Configure Project.Properties.



We found out. The two are the same. Just copy it right now.

3. Configure Proguard-project.txt

It's not configured.



Here is the configuration. Worry about the direct copy code, and then a little change, not anxious to scan the code to see the explanation below, we have to change it because this is the configuration of my project is different from yours, but the same


-optimizationpasses 5- Dontusemixedcaseclassnames-dontskipnonpubliclibraryclasses-dontpreverify-ignorewarnings-verbose-optimizations! Code/simplification/arithmetic,!field/*,!class/merging/*-dontwarn-libraryjars/libs/android-support-v4.jar- libraryjars/libs/android_sdk_component.jar-libraryjars/libs/android_sdk.jar-libraryjars/libs/ android-support-v4.jar-libraryjars/libs/baidumapapi_v2_4_2.jar-libraryjars/libs/ cloudscanvirussdk.jar-libraryjars/libs/commons-httpclient-3.1.jar-libraryjars/libs/ commons-logging-1.1.jar-libraryjars/libs/commons-net-2.0-ftp.jar-libraryjars/libs/core.jar-libraryjars/libs/ gson-2.0.jar-libraryjars/libs/jpush-sdk-release1.7.2.jar-libraryjars/libs/libammsdk.jar-libraryjars/libs/ Locsdk_3.1.jar-libraryjars/libs/phonegap.jar-libraryjars/libs/pn.jar-libraryjars/libs/proguard.jar-libraryjars /libs/signpost-commonshttp4-1.2.1.1.jar-libraryjars/libs/signpost-core-1.2.1.1.jar-libraryjars/libs/ Weibosdkcore.jar-libraryjars/libs/armeabi/xwork-2.0.1.jar-liBraryjars/libs/armeabi-v7a/jpush-sdk-release1.7.2.jar-libraryjars/libs/armeabi/libbaidumapsdk_v2_4_2. so-libraryjars/libs/armeabi/libcloudkill.so-libraryjars/libs/armeabi/libjpush172.so-libraryjars/libs/armeabi/ Liblocsdk3.so-keep class com.baidu.location.** {*;} -keep class com.google.gson.** {*;} -keep class com.baidu.** {*;} -keep class android.support.v4.** {*;} -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 and Roid.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-keepclasseswithmembernames class * {native <methods>; }-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.app.Activity {public void * (Android.view.View);      }-keepclassmembers enum * {public static **[] values ();  public static * * VALUEOF (java.lang.String);  }-keep class * Implements android.os.Parcelable {public static final android.os.parcelable$creator *;   }

Attention:


A. This plus he is ignoring the warnig. Anyway, I didn't add all kinds of mistakes.
-ignorewarnings
B. Do not compile the jar package. Search is not found also have to error this is my libs inside the jar package. You can write it all up. You have to declare the jar package or all sorts of mistakes.


-keep class com.baidu.location.** {*;}
-keep class com.google.gson.** {*;}
-keep class com.baidu.** {*;}
-keep class android.support.v4.** {*;}



This sentence is not to confuse these classes. Otherwise it can't be compiled. Why did the others not write it. Because they didn't complain. It's supposed to be that these classes have been confused. We must have an error in the confusion. I don't know, not necessarily.

You can just change the two pieces of code that I explained.

In fact, the other is from the previous version of the config.cfg inside the test came.


All right, so the configuration of your code should be confusing. It's simple.

Put the elephant in the fridge and fly the San step.


One minute to fix your confusion encryption

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.