编译ics遇到的问题

xiaowen@xiaowen-OptiPlex-790:/opt/ics$ make
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.1
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ITL41D
============================================
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.
 
Your version is: java version "1.6.0_23".
The correct version is: Java SE 1.6.
 
Please follow the machine setup instructions at
    http://source.android.com/source/download.html
************************************************************
build/core/main.mk:131: *** stop。 停止。
解决方法:

Installing the JDK

The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used.

Java 6: for Gingerbread and newer

$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk

(http://source.android.com/source/initializing.html)



不过有点慢,可以自己去 sun的官网(http://www.oracle.com/technetwork/java/javase/downloads/index.html)去下载jdk 6,这里注意openjdk编译ics会出问题.

我这里从官司网下载的:

 axel -n 10 http://download.oracle.com/otn-pub/java/jdk/6u30-b12/jdk-6u30-linux-x64.bin

再运行:chmod a+x jdk-6u30-linux-x64.bin

./jdk-6u30-linux-x64.bin

原来的链接删除:

xiaowen@xiaowen-OptiPlex-790:/usr/bin$ sudo rm -rf /usr/bin/java

xiaowen@xiaowen-OptiPlex-790:/usr/bin$ sudo rm -rf /usr/bin/javac

建立新的鏈接:

xiaowen@xiaowen-OptiPlex-790:/usr/bin$ sudo ln -s ~/backup/sun-java-6/jdk1.6.0_30/bin/java /usr/bin/java

xiaowen@xiaowen-OptiPlex-790:/usr/bin$ sudo ln -s ~/backup/sun-java-6/jdk1.6.0_30/bin/javac /usr/bin/javac



接着make编译,一切OK,启动模拟器一切正常.


你可能感兴趣的:(java,jdk,ubuntu,Build,sun,download)