CM9源码下载和编译http://www.cnblogs.com/qianxudetianxia/archive/2012/05/27/2512447.html
补充:
问题:
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.
Your version is: java version "1.6.0_39".
The correct version is: 1.5.
Please follow the machine setup instructions at
http://source.android.com/download
************************************************************
************************************************************
You are attempting to build with the incorrect version
of javac.
Your version is: javac 1.6.0_39.
The correct version is: 1.5.
Please follow the machine setup instructions at
http://source.android.com/download
************************************************************
解决:
注意:这里我要说明一下,CM9的编译脚本相对于官方源码的编译脚本忽略了或者说处理了一些可能出现的错误的地方,比如说这里java版本的检测,如果是open jdk的话,官方就编译不过,其实是一样的,只需要修改一下脚本(build/core/main.mk),找到检测java+javac版本的地方:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# Check for the correct version of java
java_version := $(shell java -version 2>&1 | head -n 1 |
grep
'^java .*[ "]1\.6[\. "$$]'
)
ifneq ($(shell java -version 2>&1 |
grep
-i openjdk),)
java_version :=
endif
ifeq ($(strip $(java_version)),)
$(info ************************************************************)
$(info You are attempting to build
with
the incorrect version)
$(info of java.)
$(info $(space))
$(info Your version is: $(shell java -version 2>&1 | head -n 1).)
$(info The correct version is: Java SE 1.6.)
$(info $(space))
$(info Please follow the machine setup instructions at)
$(info $(space)$(space)$(space)$(space)http://source.android.com/source/download.html)
$(info ************************************************************)
#$(error stop) //如果确定已经安装正确的jdk的话,这句去掉,让编译继续
endif
|