`
heji
  • 浏览: 87598 次
  • 性别: Icon_minigender_1
  • 来自: 重庆
社区版块
存档分类
最新评论

解决编译android2.2源码时出错的问题

阅读更多
今天编译android2.2的源码出现问题,问题如下:
Install: out/host/linux-x86/framework/droiddoc.jar
target Generated: libclearsilver-jni <= out/host/common/obj/JAVA_LIBRARIES/clearsilver_intermediates/javalib.jar
host C: libclearsilver-jni <= external/clearsilver/java-jni/j_neo_util.c
In file included from /usr/include/features.h:378,
                 from /usr/include/string.h:26,
                 from external/clearsilver/java-jni/j_neo_util.c:1:
/usr/include/gnu/stubs.h:9:27: error: gnu/stubs-64.h: 没有那个文件或目录
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libclearsilver-jni_intermediates/j_neo_util.o] 错误 1



解决办法:
sudo apt-get install lib64z1-dev libc6-dev-amd64 g++-multilib lib64stdc++6


打开此文件: 源码目录/build/core/main.mk

找到
# Check for the correct version of java
java_version := $(shell java -version 2>&1 | head -n 1 | grep '[ "]1\.6[\. "$$]')
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: 1.6.)
$(info $(space))
$(info Please follow the machine setup instructions at)
$(info $(space)$(space)$(space)$(space)http://source.android.com/download)
$(info ************************************************************)
$(error stop)
endif

把里面的数字"6"改成"5",用JDK 1.5编译




ok,搞定。
参考:http://www.poemcode.net/2010/07/android-stubs-64/
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics