您的位置:首页 > 移动开发 > Android开发

Android2.3 如何编译——解决

2010-12-30 09:57 459 查看
Checking build tools versions...

build/core/main.mk:77: ************************************************************

build/core/main.mk:78: You are attempting to build on a 32-bit system.

build/core/main.mk:79: Only 64-bit build environments are supported beyond froyo/2.2.

build/core/main.mk:80: ************************************************************

build/core/main.mk:81: *** stop。 停止。

请查看一下几个步骤

1 安装几个软件:

sudo apt-get install lib64z1-dev libc6-dev-amd64 g++-multilib lib64stdc++6

如果下载这些软件出错了,请看一下etc/apt/sources.list这个源里面 是否正确配置了:

下面是我正确配置的,大家可以看看。

#

# deb cdrom:[Ubuntu-Server 10.04.1 LTS _Lucid Lynx_ - Release amd64 (20100816.2)]/ lucid main restricted

#deb cdrom:[Ubuntu-Server 10.04.1 LTS _Lucid Lynx_ - Release amd64 (20100816.2)]/ lucid main restricted

# See http://help.ubuntu.com/community/UpgradeNotes
for how to upgrade to

# newer versions of the distribution.

deb http://cn.archive.ubuntu.com/ubuntu/
lucid main restricted

deb-src http://cn.archive.ubuntu.com/ubuntu/
lucid main restricted

## Major bug fix updates produced after the final release of the

## distribution.

deb http://cn.archive.ubuntu.com/ubuntu/
lucid-updates main restricted

deb-src http://cn.archive.ubuntu.com/ubuntu/
lucid-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

## team. Also, please note that software in universe WILL NOT receive any

## review or updates from the Ubuntu security team.

deb http://cn.archive.ubuntu.com/ubuntu/
lucid universe

deb-src http://cn.archive.ubuntu.com/ubuntu/
lucid universe

deb http://cn.archive.ubuntu.com/ubuntu/
lucid-updates universe

deb-src http://cn.archive.ubuntu.com/ubuntu/
lucid-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

## team, and may not be under a free licence. Please satisfy yourself as to

## your rights to use the software. Also, please note that software in

## multiverse WILL NOT receive any review or updates from the Ubuntu

## security team.

deb http://cn.archive.ubuntu.com/ubuntu/
lucid multiverse

deb-src http://cn.archive.ubuntu.com/ubuntu/
lucid multiverse

deb http://cn.archive.ubuntu.com/ubuntu/
lucid-updates multiverse

deb-src http://cn.archive.ubuntu.com/ubuntu/
lucid-updates multiverse

## Uncomment the following two lines to add software from the 'backports'

## repository.

## N.B. software from this repository may not have been tested as

## extensively as that contained in the main release, although it includes

## newer versions of some applications which may provide useful features.

## Also, please note that software in backports WILL NOT receive any review

## or updates from the Ubuntu security team.

# deb http://cn.archive.ubuntu.com/ubuntu/
lucid-backports main restricted universe multiverse

# deb-src http://cn.archive.ubuntu.com/ubuntu/
lucid-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's

## 'partner' repository.

## This software is not part of Ubuntu, but is offered by Canonical and the

## respective vendors as a service to Ubuntu users.

# deb http://archive.canonical.com/ubuntu
lucid partner

# deb-src http://archive.canonical.com/ubuntu
lucid partner

deb http://security.ubuntu.com/ubuntu
lucid-security main restricted

deb-src http://security.ubuntu.com/ubuntu
lucid-security main restricted

deb http://security.ubuntu.com/ubuntu
lucid-security universe

deb-src http://security.ubuntu.com/ubuntu
lucid-security universe

deb http://security.ubuntu.com/ubuntu
lucid-security multiverse

deb-src http://security.ubuntu.com/ubuntu
lucid-security multiverse

2 使用32位也可以编译(一直都是32 bit system)

修改build/core/main.mk

#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

endif

3 使用java1.5也可以编译 (2.2也是1.5 version)

修改build/core/main.mk

java_version := $(shell java -version 2>&1 | head -n 1 | grep '[ "]1/.5[/. "$$]')

javac_version := $(shell javac -version 2>&1 | head -n 1 | grep '[ "]1/.5[/. "$$]')

4、这个也要修改:

/external/clearsilver/cgi/Android

.mk

/external/clearsilver/cs/Android

.mk

/external/clearsilver/java-jni/Android

.mk

/external/clearsilver/util/Android

.mk

4个文件的修改策略相同,为:

# This forces a 64-bit build for Java6

-LOCAL_CFLAGS += -m64

-LOCAL_LDFLAGS += -m64

+LOCAL_CFLAGS += -m32

+LOCAL_LDFLAGS += -m32
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: