How to config your SDK

来源:互联网 发布:mac自带flash 编辑:程序博客网 时间:2024/05/22 07:48

If you need to config your environment of SDK. I think you'd better follow the steps below. 

Notice, this is for the UBUNTU 14.04  x64 version.

1, Your JDK.

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-java6-installer

(If you want to install the latest version. you can use the command below instead. However ,some program can only support JDK1.6.

sudo apt-get install oracle-java8-installer

)

2, Your SDK.


config your  library because my ubuntu is 64-bit.

sudo apt-get install -y libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1


Download the SDK from the web :http://developer.android.com/sdk/index.html

If you cannot get it, download it from here:

http://pan.baidu.com/s/1bnvVm4R

I am not sure how long will this url work.

use command to open it.

tar xzvf xxxxx.tar

I suggest you put the document under the home directory. 


3.Config the profile.
echo 'export ANDROID_HOME="home/YOUR OWN NAME/android-sdk-linux"' >> ~/.bashrcecho 'export PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"' >> ~/.bashrc
Notice: config the right directory of your SDK!
Open one new terminal and input: 
android
In the Window you can see the SDK Manager.
If you cannot update the latest version. config below:
1, in Menu tool. choose option and open your settings. check the: Force https://… sources to be fetched using http://…
2,Add the lines below at the end of the  file: /etc/hosts
sudo vim /etc/hosts
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 
It will cost several hours. By the way, I don't suggest you to copy entire sdk and eclipse from other ones even though we can do it under Windows.
(IF YOU STILL CANNOT UPDATE, CHANGE TO AN OTHER NETWORK!)
4, Your eclipse
Download the eclipse 
http://www.eclipse.org/downloads/
And also, I have one backup url:
http://pan.baidu.com/s/1ntA3U8h
also copy it to the directry home and user command tar to open it .
tar xzvf xxx.tar
config your eclipse:
Choose the menu help->Install New SoftWare.
Click add button. 
Add the follow lines:
Name:Android Location:https://dl-ssl.google.com/android/eclipse/ 
Click OK.
Check the all develop tools and install them.
If you cannot find them, download the package below:
http://pan.baidu.com/s/1o6lz23o
And still open the Install New Software and clich add button
install it by "archive".
Ok, this is your SDK in ubuntu 14.04 x64.




0 0
原创粉丝点击