2013年8月6日星期二

Android trip started on 1-ubuntu11.04 build And roid SDKdevelopment environment

 
  
    1, install the Java environment and the Eclipse development tool, "Synaptic" can be installed    
   
        
  • Java-related: sun-java6-jdk sun-java6-jre sun-java6-bin openjdk-6-jdk openjdk-6-jre
  •     
  • Eclipse related: eclipse eclipse-platform eclipse-platform-data <​​li>    
   
    Description: many installations are stated on the document to be downloaded manually install jdk and eclipse, but ubuntu11.04 which version is already very new, so not necessary.    
   
    2, download the Android SDK and ADT    
from android developer's official website can be downloaded (     developer.android.com / sdk / index.html ) the most current version of the link is as follows:    
       
can be downloaded into a specific location, such as / home / zwang / android_dev / directory. (/ Home / zwang should be changed to correspond to your home directory, the same below)    
Java installation is complete, you can enter through the terminal: java-version and javac-version output version information for detecting installed correctly.    
   
    3, configure Android SDK    
a) extract the Android SDK    
   
    
$ cd /home/zwang/android_dev/
$ tar xvf android-sdk_r11-linux_x86.tgz
   
   
For convenience, the extracted directory renamed android-sdk    
   
    
$ mv android-sdk-linux_x86 android-sdk
   
   
   
b) adding Android SDK path to the PATH environment variable    
edit ~ /. bashrc, add a line at the end of the text:    
   
    
export PATH=$PATH:/home/zwang/android_dev/android-sdk/tools:/home/zwang/android_dev/android-sdk/platform-tools
   
   
then run:    
   
    
$ source ~/.bashrc
   
   
Description: A lot of documentation is not included when you specify PATH platform-tools directory will cause the program to run through the simulator is to prompt adb not found error.    
   
    4, Configuring ADT    
start Eclipse, menu Help -> "Install New Software ...", then click on the tab "Add", a box will pop up:    
input     dl-ssl.google.com/Android/eclipse , point ok (Click unresponsive, press Enter)    
   
choose to install the software (choose two "Android DDMS", "Android Development Tools" then), the point next, and choose to accept the agreement, it will wait for a return to a successful installation, Eclipse will suggest that you restart, Click yes to.    
   
Of course, new pop-up can also click on the tab "Archive ...", select the previously downloaded ADT-11.0.0.zip, then OK. Then click on the expand icon, you can select the previous two ("Android DDMS", "Android Development Tools" two), and then Next (This method is sometimes unsuccessful, do not know why).    
   
    5, configuration in Eclipse SDK path    
Eclipse restarts, the menu Window -> Preferences, open the properties box, select Android, enter the SDK location where your Android SDK directory, and then press the Apply button.    
   
    6, set "Android SDK Manager"    
Menu window -> "Android SDK Manager", in the pop-up dialog box, select "Available Packages", then select the package you want to install the SDK, and finally click "Install-Selec ..." button to install. (2.2 and 2.3 selected here two inside "SDK Platform" to, the other co-opt according to need) and then after a period of time after the installation is complete the download.    
   
    7, create an emulator    
AVD value is "Android Virtual Device Android", ie, a virtual appliance.    
Menu window -> "AVD Manager", in the pop-up dialog box, click the right of the "New ...", according to their own needs to add parameters to create a version of the SDK emulator (example parameters shown ). Click "Create AVD" will be created to run an Android Virtual Device.    
   
   
    
          
   
   
they can click start to start, the effect is as follows:    
   
   
    
          
   
   
At this point, Android development environment has been basically completed structures.    
   
    reference links:    
[1]     www.cnblogs.com/candycaicai/archive/ 2011/02/25/1964940.html    
[2]     blog.csdn.net/forlong401/archive / 2011/03/28/6284337.aspx   
 

没有评论:

发表评论