打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

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

编译android2.2的源码出现问题,问题如下:

1)Java代码

    Checking build tools versions...
    build/core/main.mk:72: ************************************************************
    build/core/main.mk:73: You are attempting to build on a 32-bit system.
    build/core/main.mk:74: Only 64-bit build environments are supported beyond froyo/2.2.
    build/core/main.mk:75: ************************************************************
    build/core/main.mk:76: *** stop. Stop.

解决办法:

    #ifneq (64,$(findstring 64,$(build_arch)))
    ifneq (i686,$(findstring i686,$(build_arch)))
    $(warning ************************************************************)
    $(warning You are attempting to build on a 32-bit system.)
    $(warning Only 64-bit build environments are supported beyond froyo/2.2.)
    $(warning ************************************************************)
    $(error stop)
    endif

修改以下文件:

    external/clearsilver/cgi/Android.mk,
    external/clearsilver/java-jni/Android.mk,
    external/clearsilver/util/Android.mk,
    external/clearsilver/cs/Android.mk

改为

    disable LOCAL_CFLAGS += -m64
    disable LOCAL_LDFLAGS += -m64
    LOCAL_CFLAGS += -m32
    LOCAL_LDFLAGS += -m32

2)Java代码

     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  

3)Java代码

打开此文件: 源码目录/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编译  


 

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
[z]ubuntu 11.10(32位系统)下编译android源码
Android源码编译遇到的问题
android自动点击的实现流程记录
非官网下载的android 源码编译问题 及解决方法
Android深入浅出系列课程
Android 技术专题系列之三 -- 编译(build) 流程 - shenbin143...
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服