Android2.3 如何編譯——解決

來源:互聯網
上載者:User

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

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.