Compile Android 4.0.3 or more Jelly Bean on Ubuntu11.04_x64
来源:互联网 发布:淘宝个人尺码设置在哪 编辑:程序博客网 时间:2024/05/20 20:21
1.Wrong Java Version
I have the Java 6 OpenJDK, version 1.6.0_24. This meets the android Java requirement for 1.6.0, but I found (later in the build process) that Android really needs to be built by Sun’s Java SDK. In the meantime, the _24 suffix doesn’t check out in Android’s makefile, which produces the error You are attempting to build with the incorrect version of java before exiting:
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.
Your version is: java version "1.6.0_24".
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. Stop.
Commenting out the $(error stop) statement from build/core/main.mk on line 131 will allow compilation to proceed:
131
132
# $(error stop)
endif
make will display the error message, but continue compiling. However, compiling with OpenJDK will probably create problems later in the build process (in out/target/common/obj/APPS/CtsVerifier_intermediates/classes-full-debug.jar). To fix the problems, Sun’s Java SDK will need to be installed.
2.Installing the Sun Java 6 JDK in Ubuntu 12.04
To fix the make: *** [out/target/common/obj/APPS/CtsVerifier_intermediates/classes-full-debug.jar] Error 41, get the most recent Sun JDK from here. Once you’ve downloaded it, install it and run update-alternatives so your system uses the Sun JDK:
$ chmod +x jdk-6u33-linux-x64.bin
$ sudo ./jdk-6u33-linux-x64.bin
$ sudo mv jdk1.6.0_32 /usr/lib/jvm/
$sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_33/bin/java 1
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_33/bin/javac 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_33/bin/javaws 1
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config javaws
To verify that the installation was successful, check Java’s version. It should now show that the Sun JDK is running instead of IcedTea:
$ java -version
java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)
To revert the changes after Android has been compiled, run update-alternatives to switch back to OpenJDK.
- Compile Android 4.0.3 or more Jelly Bean on Ubuntu11.04_x64
- Android: Jelly Bean 来了!
- Android 4.1~4.3 Jelly Bean
- How to Install CyanogenMod 10 Android 4.1 Jelly Bean ROM on Samsung Galaxy S Duos S7562
- How to Root Galaxy Tab 2 10.1 P5100 on Android 4.1.1 Jelly Bean Official Firmware
- Android 4.1 Jelly Bean 相关资源
- 解读 Android 4.2 Jelly Bean 新特性
- Android 4.1 (Jelly Bean,果冻豆)
- Android Jelly Bean滑动解锁控件实现
- Android 4.1 Jelly Bean安全機制探討 【转】
- Android 4.1 Jelly Bean安全機制探討
- Android 4.1 Jelly Bean安全機制探討
- Android Multimedia Framework 架构--base on jelly...
- Android 4.1 Jelly Bean(果冻豆) SDK4.1最新下载
- 谷歌Android 4.1(Jelly Bean)新特性一览
- Android 4.1 (Jelly Bean) 源码编译过程总结
- Android 4.1 Jelly Bean(果冻豆) 源码下载
- Jelly Bean增长惊人 Android在美份额达51.6%!
- JAVA -Cookie和Session专题
- UVA 10422 - Knights in FEN
- 一键安装Linux+Nginx+MySQL+PHP完美版
- android根据基站信息获取经纬度
- SecureCRT和Vim中文乱码问题
- Compile Android 4.0.3 or more Jelly Bean on Ubuntu11.04_x64
- 软件测试面试题及解析(六)
- ABAP: 今天是星期几?
- 如何在C++中使用libjpeg.lib函数库
- UVA 532 - Dungeon Master
- 软件测试面试题及解析(七)
- 【midomi】Android下最强音乐搜索工具
- 无法打开文件"LIBC.lib / libcp.lib"解决办法
- 获取tomcat连接池