2013年8月6日星期二

64 under ubuntu android development environment configuration

 

This article describes how to build a 64-bit ubuntu on android development environment.

 

system: ubuntu12.04LTS

 

using ADT Bundle for Linux and jdk1.7 (open jdk also available)

 

total is divided into three steps to go: < / span>

 

1. Configure JDK

 

install Open jdk < / span>

 

$ sudo apt-get install openjdk-7-jdk

 

or

 

official website to download from the oracle

 
      
  • downloaded from the official website JDK 64-bit version
  •   
  • extracting installer
  •  
 

will extract the files with the highest permissions to / usr / lib / jvm li

 

sudo cp-r ~ / jdk1.7 / / usr / lib / jvm

 

(middle two "/" not connected together, with spaces)

 
      
  • modify environment variables
  •  
 

sudo gedit ~ /. profile

 

added at the end

 

export JAVA_HOME = / usr/lib/jvm/jdk1.7

 

then save off using the source update about

 

$ source ~ /. profile

 
      
  • configure the default JDK version
  •  
 

$ sudo update-alternatives - install / usr / bin / java java / usr/lib/jvm/jdk1.7/bin/java 300

 
      
  • $ sudo update-alternatives - install / usr / bin / javac javac / usr/lib/jvm/jdk1. 7/bin/javac 300
    $ sudo update-alternatives - config java
    $ sudo update-alternatives - config javac
  •  
 
      
  • confirm JDK installed successfully
  •  
 

$ java-version

 

If you see a java version "1.7.XXXX", then it indicates that the installation was successful.

 

2. Installing ADT Bundle for Linux < / span>

 

from Google official website download ADT Bundle for Linux, this package contains android sdk and eclipse, and is already installed adt.

 

directly after the download is complete, extract the installation directory.

 

Maybe you have: < / p>  

      
  • open eclipse
  •   
  • execution Help -> Install New SoftWare ...
  •   
  • click Add ...
  •   
  • the pop-up dialog box, fill Name: Android Developer Tools Update Site , Location: http://dl-ssl.google.com/android/eclipse/
  •   
  • finish
  •  
 

I did this step because I found the lack of updating the site, rather than to install adt.

 

3. install ia32-libs

 

and 32 in front of perhaps the ubuntu install similar, but then this is the 64 bit systems must be done, otherwise there will be (... adb ": error = 2, No such file or directory) such errors. The reason is Android sdk only 32bit program, you need to install ia32-libs, can be used.

 

$ sudo apt-get install ia32-libs

 

Note: ia32-libs relatively large

 

没有评论:

发表评论