Win10 in Android Studio (without SDK) after installation how to related errors Jump Pit guide

Source: Internet
Author: User
Tags android sdk manager

WIN10 System Download the latest Android Studio3.1.3 Open Interface, create the first HelloWorld Android app, burst the red one, was pit for two days, prompted the following error:

Gradle Sync failed

Unknow host service.gradle.org, you could need adjust the proxy settings in Gradle

And so on, Google did not search a bunch. After repeated attempts to finally succeed, especially to share with you the experience:

Download the latest version of Android Studio 3.1.3 with the address: https://developer.android.com/studio/

1. JDK is required, install Java
Download Java installation package (JDK, there are many online, it is best to go to the official website: https://www.java.com/zh_CN/) After installation must be configured environment variables;

(1) in "System variables" to create a variable named Java_home variable, the value of the variable is your local Java installation directory, I am here: C:\Program files\java\jdk1.7.0_80, set this to be a reference to the following two environment variables.

(2) View the path variable in the system variables options area, if it does not exist, create a new variable path, otherwise select the variable, click the Edit button, and add "%java_home%\bin;%java_home%\jre\bin;" At the beginning of the Variable Value text box.

View the CLASSPATH variable in the system Variables options area, and if it does not exist, create a new variable classpath, otherwise select the variable, click the Edit button, and add "in the start position of the Variable Value text box."; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar; "

2, the latest version of the official website does not have an integrated SDK, so you need to download the Android SDK yourself.
Https://dl.google.com/android/installer_r24.4.1-windows.exe, download finished, directly run the installation can, the installation process will automatically match the JDK in the local environment. As follows:

SDK Manager is self-bringing, you can choose a stable number of commonly used SDK version, followed by the actual increase.

3, if the SDK manager can not update, or very slow, set the SDK manage agent, as follows (I set my own XXX agent, with the blue light, according to their own * * * settings!) ):

Usually the online introduction of some of their own mirror server, such as Dalian Neusoft University mirror server address: mirrors.neusoft.edu.cn:80, and XXX Open Source Association Mirror station Address: mirrors.opencas.org:80 and so on, as follows:

4, the SDK environment variables must be configured: Turn on the computer properties-Advanced system settings-environment change.
Create a new system variable, variable name: android_home, Variable Value: D:\ANDROID\SDK (in your installation directory, confirm that there are tools and add-ons and other folders), click to confirm; Add the variable value after the system variable path;%android _home%\platform-tools; click to confirm; Add in the system variable path; D:\android\sdk\tools.
The Android SDK configuration is complete, and then verify that the configuration is successful.

Click Run-Enter cmd--carriage return-Enter adb--, if a bunch of English, that means the configuration is successful, in the input Android, launch Android SDK Manager.

5, you can try to create a HelloWorld. If there is a problem, then it may be the mirror agent is unstable, the configuration of the mirror proxy file-settings-appearance&behavior-system settings-http proxy must be set up, if not, it is recommended to buy a stable xx x!

After the final configuration, please remember to add systemprop.http.proxyhost= and systemprop.http.proxyport= to the Gradle.properties file found in your project file. The following are your proxy server IP address and port number, respectively.

Win10 in Android Studio (without SDK) after installation how to related errors Jump Pit guide

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.