[Android] _ [elementary] _ [getting started with Android Development Environment (Windows)] and setting up android
Scenario:
1. How do I configure the android development environment when I suddenly receive android development tasks?
2. currently, android studio is based on idea. It runs on my computer and card (dual-core i5, 64-bit Win7, 4G memory ). and there are legacy eclipse projects, most of the tutorials are based on eclipse.
Therefore, the adt development android program is more suitable for beginners.
3. If you have in-depth research, it is not impossible to use other ides to work with build sdk development.
Step 1. Configure the Android development environment of ADT.
Note 1: If you want to download all Android APIs, it will take a lot of time, so select a special version of the API.
There is also a large simulator image file. If you want to download the estimated space of more than 10 Gb, If You Want To directly use the real machine for debugging,
You do not need to download these images.
Figure 1
Figure 3
NOTE 2: It is recommended that the android sdk be installed in the same directory as eclipse, so that you can view the source code and find related resource files.
Figure 4
NOTE 3: Because google is on the wall, you need to configure hosts when downloading the android sdk.
C: \ Windows \ System32 \ drivers \ etc \ hosts
Add
203.208.48.134 dl-ssl.google.com
Note 4: Download the sdk of version 1.7 or later. Compiling android 5.0 or later requires support of version 1.7 or later, and example 21 requires JDK of version 1.7 or later to be compiled successfully.
Http://www.oracle.com/technetwork/java/javase/overview/index.html
Choose one of the following articles to configure the environment:
Http://www.cnblogs.com/allenzheng/archive/2012/11/10/2762379.html
Http://blog.csdn.net/cxc19890214/article/details/41249761
Step 2. Resource
-- Eclipse 3.7.2 (Eclipse IDE for Java Developers). If it is a 64-bit host, we recommend that you download the 64-bit version.
Http://www.eclipse.org/downloads/packages/release/indigo/sr2
-- ADT. To download the latest ADT 23.0.4 (October 2014), you need to flip the wall:
Http://developer.android.com/sdk/installing/installing-adt.html
Https://dl.google.com/android/ADT-23.0.4.zip
-- Java 1.7
Http://www.oracle.com/technetwork/java/javase/overview/index.html
--
Step 3. Create a simple project and run it.
Choose File> New> Android Application Project.
Figure 2:
FAQ: solutions to problems encountered during development.
Question 1: The zipalign tool was not found in the SDK.
Please update to the latest SDK and re-export your application or run zipalign manually.
Aligning applications allows android to use application resources more effciently.
Solution: Update to the latest sdk build-tool.
Question 2: [08:32:00-SimpelExample] E: \ workspace_android \ appcompat_v7 \ res \ values-v21 \ styles_base.xml: 75: error: Error retrieving parent for item: no resource found that matches the given name 'android: Widget. material. actionButton '.
Solution: Select 8 for MinSDKVersion. The MaxSDKVersion and TargetSDKVersion must be 21, because the generated template example is based on 21 and will definitely compile 21.
ADT-23.0.4
Reference: http://blog.csdn.net/cxc19890214/article/details/41281439
Question 3:
1. When you need to write the main function test code for a class, the following crash occurs when you use ADT.
Reference: http://www.cnblogs.com/lzhitian/archive/2012/04/12/2444960.html
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (classFileParser. cpp: 3494), pid = 7480, tid = 7376
Solution:
1. Right-click the test class you want to Run and choose Run As> Run commands...
2. Switch to the Classpath option bar, delete the Android Library in Bootstrap Entries, and click "Advanced..."> "Add Library"> "JRE System Library" on the right to go to "next.
Then run the class to run normally.
Question 4: an additional appcompat_v7 issue occurs when you create an Android project in Eclipse.
Reference: http://blog.csdn.net/crazykbc/article/details/21553699
In general, this Project is a Library Project, which enables your Android Project to access the ActionBar API in API 7 + sdk version (Android2.1, the ActionBar is equivalent to the operation bar on the user interface.
Question 5: Where is the Android SDK Manager? Is disabling it affected?
Android SDK Manager is an independent program. Closing eclipse does not affect it.
Choose Windows> Android SDK Manager.
You can run it directly, in the installation directory of the Android SDK. SDK Manager.exe