[转]解决Android编译中的32/64位问题 ….
android 2010-10-17 17:35:21 阅读340 评论0 字号:大中小 订阅
编译错误如下:
root@zmhot88-laptop:/work/android/src# make
============================================
PLATFORM_VERSION_CODENAME=AOSP
PLATFORM_VERSION=AOSP
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=OPENMASTER
============================================
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.
解决方案:
To solve the issue due to sun-java6-sdk, just comment all:
> # LOCAL_CFLAGS += -m64
> # LOCAL_LDFLAGS += -m64
>
> in files:
> ./external/clearsilver/cgi/Android.mk
> ./external/clearsilver/java-jni/Android.mk
> ./external/clearsilver/util/Android.mk
> ./external/clearsilver/cs/Android.mk
>
> or change 64 to 32
====================================================
[ANDROID 問題] 64-BIT ENVIRONMENT REQUIRED WHEN CHECKING BUILD TOOL VERSIONS
If you meet following errors below when you try to build your source code:
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:
************************************************************
Don’t panic, just change the code marked red in
build/core/main.mk
ifeq ($(BUILD_OS),linux)
build_arch := $(shell uname -m)
---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.)
(--- means delete that line, +++ means add that line)
a
and change the code in four mk files below from “+=-m64” to “+=-m32”
external/clearsilver/cgi/Android.mk
external/clearsilver/java-jni/Android.mk
external/clearsilver/util/Android.mk
external/clearsilver/cs/Android.mk
LOCAL_CFLAGS += -m32
LOCAL_LDFLAGS += -m32
I met this problem when trying to build the source code downloaded from Google directly.
阅读(1584) | 评论(0) | 转发(0) |