Build an android development environment in Windows

Source: Internet
Author: User

When creating a project, the system prompts: the specified file cannot be found in proguard. cfg. 

 

Solution:

Method 1: Create a proguard. cfg file in the Android-SDK-windowstoolslib directory.

The content is as follows:

-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;
}
-Keepclasseswithmembernames class *{
Public (Android. content. Context, Android. util. attributeset );
}
-Keepclasseswithmembernames class *{
Public (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 2: update the SDK through Android SDK and AVD manager.

 

About panic: cocould not open: C: \ Documents ents and Settings \ Administrator \. Android/AVD/my_avd.

Note the following two points.

1. the SDK calls the default path variable. Put the. Android folder in the Chinese directory. Therefore, it cannot be read.

2. In addition, Android-SDK-Windows cannot be placed in the Chinese directory; otherwise, errors will inevitably occur.

As long as it is not installed in the Chinese directory, it is a path problem, because the SDK environment variables are not set, the system will call the default environment variable path.

Solution
1: Create a new "system variable" in the environment variable"
Android_sdk_home = full path of Android-SDK (for example, my "D: \ Android-SDK-Windows ");
2: Modify the path of the system variable and add "% android_sdk_home %/tools;" to "..;" (if there is no "..;", pull it down and put it in front of it. ".;" Indicates the current directory. Later)

3. modify the configuration file in the eclipse installation directory: Find the following file: Eclipse \ configuration. settings \ Org. eclipse. UI. IDE. after prefs is enabled, add the environment variable you Just configured.

For example, I added: android_sdk_home = e \: \ Java \ androidsdk (note the slash format)

4: restart eclipse, re-build AVD, and run it successfully.

 

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.