下载Gingerbread 源代码在32-bit的环境中编译,会出现如下的build error:You are attempting to build on a 32-bit system. Only 64-bit build environments are supported beyond froyo/2.2.
解决方法:
1. 在如下四个文件中:
./external/clearsilver/cs/Android.mk
./external/clearsilver/cgi/Android.mk
./external/clearsilver/java-jni/Android.mk
./external/clearsilver/util/Android.mk
将下面的两行删除,
LOCAL_CFLAGS += -64
LOCAL_LDFLAGS += -64
并加入如下部分:
build_arch := $(shell uname -m)
ifeq (i686,$(findstring i686,$(build_arch)))
LOCAL_CFLAGS += -m32
LOCAL_LDFLAGS += -m32
else
LOCAL_CFLAGS += -64
LOCAL_LDFLAGS += -64
endif
2. 然后在./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
阅读(1100) | 评论(0) | 转发(0) |