android studio download sdk under mac

SDK download address: http://www.androiddevtools.cn/
For well-known reasons, the difficult situation of accessing google-related services in China, direct connection is definitely not feasible, and the problem of updating the SDK can be solved by setting the hosts point.
1. Open Webmaster Tools - Super Ping page: http://ping.chinaz.com, enter "dl-ssl.google.com", deselect all the options below, select only "Overseas", and then click Query button, find a fast one in the query results, such as
2. Go to the Mac desktop, shift+command+g to open the Go to Directory dialog box, enter "/private/etc/", and press Enter

3. In this directory Find the hosts file, first copy the file to the desktop, then open the file for editing, and add the following mapping relationship
64.233.187.136 dl-ssl.google.com

4. Go back to the directory "/private/etc/" and set the hosts To delete the file, you need to enter the management password, and then copy the modified hosts file on the desktop, and also need to enter the management password.

5. Restart the Android SDK Manager, and you should be able to get the update list normally. Select the option to update, and you're done. The next time you use it, you may need to modify the mapped IP in hosts again.

Possible problems:
2. Fetching android sdk component information has been loading problems      
After the installation is complete, if you start it directly, Android Studio will obtain the android sdk component information. This process is quite slow, and it often fails to load, causing Android Studio to fail to start. The solution is not to get the android sdk component information. The method is as follows:

  1) Enter the application, find Android Studio, right-click-->Show Package Contents-->Contents-->bin, find the file idea.properties, open it with a text tool

  2) Add a line at the end of the idea.properties file: disable.android.first.run=true, then save the file.

  3) Close Android Studio and restart it to enter the interface.

      Refer to the network solution, as in Solution 1 in the solution SDK, the content needs to be modified.

      The reason for this slowness is that the android website is blocked and must be accessed by a proxy!

      After restarting, it is prompted that the android SDK directory is required, which needs to be downloaded separately from the android official website.


3, mac android environment variable configuration
vim ~/.bash_profile
edit environment variable through editor
export PATH=$PATH:/Users/xxx/Library/Android/sdk/platform-tools
export PATH=$PATH:/Users/xxx/Library /Android/sdk/tools
refresh environment variables after modification
source ~/.bash_profile

Test adb
$adb version
shows
Android Debug Bridge version 1.0.31
Test android
$android
will open the Android SDK Manager window
OK, you're done!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326417304&siteId=291194637