Windows 8 (64-bit) How to build an Android development environment with a real machine test

Source: Internet
Author: User
Tags android sdk manager java se

First of all: there can be no space or Chinese in the path of installing the Java SDK and the Android SDK, otherwise there will be a flashback when launching the Android SDK Manager.
This installation procedure is also suitable for X86 's Android development environment, and it is OK to pay attention to the version when downloading.

Http://www.cnblogs.com/91program/p/5192135.html

1: Download Install Java SE JDK (2014-08-20)
Jdk-8u20-windows-x64.exe, currently the latest version is jdk1.8.0_20
Http://www.oracle.com/technetwork/java/javase/downloads/index.html
Configure environment variables Java_home point to the JDK installation directory method:
My Computer--environment variable, the new Java_home value is: X:\Java\jdk1.8.0_20 (directory where the JDK is installed);
Additionally, you need to modify the Path variable to increase%java_home%\bin
The CLASSPATH value is:.; %java_home%\lib\tools.jar;%java_home%\lib\dt.jar;%java_home%\bin; (Note that there is a dot (.) on the front)

Verification Method: Environment variable configuration after the completion of the console input "Javac", if there is no "javac not internal command" prompt, the installation is successful!

2: Download install Android SDK (Google Android SDK R23.0.2)
You need to specify the JDK path first, as above 1.
Now Google offers two ways to download: One is to integrate eclipse/adt/and/sdk/together; one is to download individual software individually and assemble its own environment,
Address is: http://developer.android.com/sdk/index.html (in the Kingdom of this website is difficult to open AH!)
Http://download.pchome.net/development/sample/download-142455.html

1) Run Installer_r23.0.2-windows.exe as administrator (download Android SDK installation package)
2) Follow the instructions to step one, install the last step of the successful option to launch "Android SDK Manager"
3) in the pop-up Android SDK Manager window, tick the version of the Andriod SDK you want to install, where the best of "Tools" and "Extras" are checked-the execution of this step is also dangerous!!! (Modify the options in the Hosts and menu Tools/options as follows)
4) Configure environment variables for Android SDK
Create a new path value in User variables: absolute path to Tools and Platform-tools in the Android SDK
(Example: X:\Android\android-sdk\tools and X:\Android\android-sdk\platform-tools)
After the configuration is complete, enter "Android-version" in the console and if the version information for the Android SDK is displayed, the installation is successful.

3: Open SDK Manager, update required Android version (optional, preferably on request)

If you are not connected to the server, try to add the driver/etc/hosts under System32:
203.208.46.146 www.google.com
74.125.113.121 developer.android.com
203.208.46.146 dl.google.com
203.208.46.146 dl-ssl.google.com

Open the Android SDK Manager, in the Options under Tools, there is a force https://..sources to be fetched using http://.

Check this one out and you can.

4: Download Eclipse IDE for Java developers Windows 64-bit, currently the latest version is: Eclipse (4.4.0)
http://www.eclipse.org/downloads/
After download, such as: Eclipse-java-luna-r-win32-x86_64.zip (eclipse-jee-luna-r-win32-x86_64.zip) file, after decompression can be used, do not install.

5: Install ADT (adt-23.0.3.zip)
Http://developer.android.com/sdk/installing/installing-adt.html (do not unzip)
Open Eclipse->help->install New Software->add
Name random (such as: Android-adt), location can fill in the URL http://dl-ssl.google.com/android/eclipse, selected out of the installation. Take a look at the specific steps:
1) Unzip the Eclipse Tarball downloaded in the first step to open eclipse
2) in the menu, select "Help", "Install New Software"
3) Click "Add ..." button, the pop-up dialog asks for Name and Location,name (for example: Android-adt);
Also click "Add ..." in step 3) button to enter Name in the popup dialog box; Then click on "Archive ..."
Find the Eclipse ADT package that you just downloaded, import it, confirm it all and click Next to install.

Here's another way:
Location Input: Http://dl-ssl.google.com/android/eclipse
Make sure that the plugins you want to install are all checked and click Next to install. If the network speed is slow, this method will wait for a long time

6: Create AVD
1) Select Windows->android Virtual Device Manager in Eclipse
2) Click on the left panel of Android Virtual Devices, then right click on New
3) Fill in the Name, select the Target api,sd Card size arbitrary, Skin random selection, Hardware currently keep the default value
4) Click OK to complete the AVD creation

7: Open Eclipse and start your Android journey
__________________________________________________________________________________________________

How Android connects to a real-computer test
1. Set up Android phone for USB debug mode
Step: Development, Application---settings, Main menu, select: USB Debugging
2. Connect your phone and computer with USB and ensure success
Step: Perform C:\ADB devices under Windows to see if the phone is connected successfully
3. Set the application to debug mode
Step: Edit Androidmanifest.xml, add debug parameter Android:debuggable= "True", as follows:
<application android:icon= "@drawable/icon" android:label= "@string/app_name" android:debuggable= "true" >
4. Perform a real-machine debug operation
In the ECLIPSE Debug dialog box, select Manual in the Target window, click the "Debug" button, select the real machine device, and start debugging.

Regardless of whether the ECLIPSE environment is enabled or not, any Android software that has an exception running on a real machine can be viewed under a command-line window with specific exception information:
Execution:. \adb Logcat can see more system exception messages. In these messages, be careful to look at caused by: lines that indicate which line of code is wrong

Windows 8 (64-bit) How to build an Android development environment with a real machine test

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.