How to FIX: A new Android program occurred when the \android-sdk-windows\tools\lib\proguard.cfg file was not found error

Source: Internet
Author: User

Problem Overview:

The following error occurred while creating a new Android program:

Can't find the \android-sdk-windows\tools\lib\proguard.cfg file

Reason:

The SDK is not complete.

Workaround:

Method One

You can create a new proguard.cfg file in the \android-sdk-windows\tools\lib\ directory

Then add the following content:

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

Method Two

Update all SDKs with Android SDK and AVD manager.

Related Article

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.