下载了android 2.3源码,但是当编译的时候,遇到了如下问题:
build/core/main.mk:77: You are attempting to build on a 32-bit system.
build/core/main.mk:78: Only 64-bit build environments are supported beyond froyo/2.2.
原因是编译gingerbread默认需要64位系统和Java6,在32位系统上修改下列文件能解决这个问题:
1. build/core/main.mk,查找下面部分
++++++++++++++++++++++++++++++++++++++++++
ifeq ($(BUILD_OS),linux)
build_arch := $(shell uname -m)
ifneq (64 ,$(findstring 64 ,$(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
endif
+++++++++++++++++++++++++++++++++++
将64修改成 i686,注意 i必须是小写 。
2.依次修改下列文件
external/clearsilver/cgi/Android.mk
external/clearsilver/java-jni/Android.mk
external/clearsilver/util/Android.mk
external/clearsilver/cs/Android.mk
在上述文件中查找如下变量,将m64修改成m32
LOCAL_CFLAGS += -m64
LOCAL_LDFLAGS += -m64
你也能在vim中快速替换:
:%s/m64/m32/g