修改 build/core/main.mk 后,用jdk 1.6编译android2.2
2012-01-05 22:41
716 查看
系统中默认是jdk是1.6版本的,编译android2.2系统时,要求用1.5。
其实用1.6也可以编译通过。只要修改 build/core/main.mk,将jdk版本检查的部分屏蔽就可以了。
屏蔽后如下 :
build/core/main.mk
100
101 # The windows build server currently uses 1.5. This will be fixed.
102 ifneq ($(HOST_OS),windows)
103
104 # Check for the correct version of java
105 java_version := $(shell java -version 2>&1 | head -n 1 | grep '[ "]1\.5[\. "$$]')
106 #ifeq ($(strip $(java_version)),)
107 #$(info ************************************************************)
108 #$(info You are attempting to build with the incorrect version)
109 #$(info of java.)
110 #$(info $(space))
111 #$(info Your version is: $(shell java -version 2>&1 | head -n 1).)
112 #$(info The correct version is: 1.5.)
113 #$(info $(space))
114 #$(info Please follow the machine setup instructions at)
115 #$(info $(space)$(space)$(space)$(space)http://source.android.com/download)
116 #$(info ************************************************************)
117 #$(error stop)
118 #endif
119
120 # Check for the correct version of javac
121 javac_version := $(shell javac -version 2>&1 | head -n 1 | grep '[ "]1\.5[\. "$$]')
122 #ifeq ($(strip $(javac_version)),)
123 #$(info ************************************************************)
124 #$(info You are attempting to build with the incorrect version)
125 #$(info of javac.)
126 #$(info $(space))
127 #$(info Your version is: $(shell javac -version 2>&1 | head -n 1).)
128 #$(info The correct version is: 1.6.)
129 #$(info $(space))
130 #$(info Please follow the machine setup instructions at)
131 #$(info $(space)$(space)$(space)$(space)http://source.android.com/download)
132 #$(info ************************************************************)
133 #$(error stop)
134 #endif
135
136 endif # windows
其实用1.6也可以编译通过。只要修改 build/core/main.mk,将jdk版本检查的部分屏蔽就可以了。
屏蔽后如下 :
build/core/main.mk
100
101 # The windows build server currently uses 1.5. This will be fixed.
102 ifneq ($(HOST_OS),windows)
103
104 # Check for the correct version of java
105 java_version := $(shell java -version 2>&1 | head -n 1 | grep '[ "]1\.5[\. "$$]')
106 #ifeq ($(strip $(java_version)),)
107 #$(info ************************************************************)
108 #$(info You are attempting to build with the incorrect version)
109 #$(info of java.)
110 #$(info $(space))
111 #$(info Your version is: $(shell java -version 2>&1 | head -n 1).)
112 #$(info The correct version is: 1.5.)
113 #$(info $(space))
114 #$(info Please follow the machine setup instructions at)
115 #$(info $(space)$(space)$(space)$(space)http://source.android.com/download)
116 #$(info ************************************************************)
117 #$(error stop)
118 #endif
119
120 # Check for the correct version of javac
121 javac_version := $(shell javac -version 2>&1 | head -n 1 | grep '[ "]1\.5[\. "$$]')
122 #ifeq ($(strip $(javac_version)),)
123 #$(info ************************************************************)
124 #$(info You are attempting to build with the incorrect version)
125 #$(info of javac.)
126 #$(info $(space))
127 #$(info Your version is: $(shell javac -version 2>&1 | head -n 1).)
128 #$(info The correct version is: 1.6.)
129 #$(info $(space))
130 #$(info Please follow the machine setup instructions at)
131 #$(info $(space)$(space)$(space)$(space)http://source.android.com/download)
132 #$(info ************************************************************)
133 #$(error stop)
134 #endif
135
136 endif # windows
相关文章推荐
- 编译android内核和文件系统,已经安装jdk,提示build/core/config.mk:268: *** Error: could not find jdk tools.jar
- 编译android内核和文件系统,已经安装jdk,提示build/core/config.mk:268: *** Error: could not find jdk tools.jar
- build/core/main.mk:129: *** stop。 停止。『 android make后报JDK报错的解决方法』
- 编译android内核和文件系统,已经安装jdk,提示build/core/config.mk:268: *** Error: could not find jdk tools.jar
- Android源码编译 build/core/base_rules.mk 报错解决方法
- android build/core/main.mk 简单的使用方法
- Android build(2) -- 走读build/core/main.mk
- android 学习笔记(八)android底层学习8.1 学习makefile 走读build/core/main.mk
- [笔记分享] [Build] Android编译系统源代码之main.mk
- 编译android源码项目报:build/core/base_rules.mk:191: ***
- Android编译系统分析---main.mk
- 编译cocos2d c++工程报错 build-binary.mk:589: obj/local/armeabi/libcocos2dcpp.so] Error 1 cpp自动导入Android.
- 深入分析Android (build/core/*.mk脚本)
- 深入分析Android (build/core/*.mk脚本)
- Android编译系统(四):Android 编译系统框架分析及main.mk分析 .
- cocos2dx交叉编译之Android.mk修改
- 在Android系统中修改Android.mk使其同时编译rgb2565和rgb2888(向out/host/linux-x86/bin/下新增加一个工具命令)
- cocos2d-x通过build_natice.sh编译成android时不用每次更改Android.mk文件处理
- android2.2 SDK编译错误 javadoc java1.6/java1.5
- cocos2d-x避免手动修改android.mk文件来编译