Android2.3源码编译问题已解决

$ repo init -u git://Android.git.kernel.org/platform/manifest.git
$ repo sync
下载完代码后,进行make,
$cd ~/mydroid
$make
却出现了如下错误:
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.
这是因为froyo/2.2默认只支持64-bit,看到有些网友还要去下载64-比他的操作系统,很是麻烦,于是通过不断搜索资料终于解决,

解决办法:
需要进行如下修改即可,

./external/clearsilver/cgi/Android.mk
./external/clearsilver/java-jni/Android.mk
./external/clearsilver/util/Android.mk
./external/clearsilver/cs/Android.mk
四个文件中的

# This forces a 64-bit build for Java6  
LOCAL_CFLAGS += -m64
LOCAL_LDFLAGS += -m64

# We use the host compilers because the Linux SDK build
# uses a 32-bit toolchain that can't handle -m64
注释掉,或者将“64”换成“32”
LOCAL_CFLAGS += -m32
LOCAL_LDFLAGS += -m32

然后,将
./build/core/main.mk 中的
ifneq (64,$(findstring 64,$(build_arch)))
改为:
ifneq (i686,$(findstring i686,$(build_arch)))

你可能感兴趣的:(android,linux,git,jni,cgi)