Android 2.3.4 download and build in ubuntu 11.10
2011-12-21 16:19
441 查看
# Android 2.3.4 download and build in ubuntu 11.10
1 Download repo tools
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
2 Download source code of android 2.3.4
repo init -u git://android.git.kernel.org/platform/manifest.git -b android-2.3.4_r1
repo sync
3 Build android error fix
make -j2
1) Error 1:
build/core/main.mk:78: Only 64-bit buildenvironments are supported beyond froyo/2.2.
update file build/core/main.mk
ifeq ($(BUILD_OS),linux)
build_arch := $(shell uname -m)
---ifneq (64,$(findstring64,$(build_arch)))
+++ifneq (i686,$(findstring i686,$(build_arch)))
change the code infour 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
2) Error 2:
frameworks/base/libs/utils/RefBase.cpp:483:67: error: passing 'const android::RefBase::weakref_impl' as 'this' argument of 'void android::RefBase::weakref_impl::trackMe(bool, bool)' discards qualifiers [-fpermissive]
# Need install gcc-4.4 and g++-4.4
sudo apt-get install gcc-4.4
sudo apt-get install g++-4.4
# And configure the default gcc g++
cd /usr/bin
ls -l gcc*
sudo mv gcc gcc.bak
sudo ln -s gcc-4.4 gcc
sudo mv g++ g++.bak
sudo ln -s g++-4.4 g++
gcc -v
g++ -v
4 build android sdk
make sdk
cd /out/host/linux-x86/sdk/tools/
./android create avd –n NO1 –t 1
Error: Target ID is not valid.
./android
Select "Availiable Packages", and click the sources box
Then Select "Install Selected"
相关文章推荐
- to build android 2.3.4 on ubuntu 11.10 64bit
- Download and Install AndroidSDK in Ubuntu 12.04 (Precise Pangolin)
- Download and Install AndroidSDK in Ubuntu 12.04 (Precise Pangolin)
- build and set proxy in Ubuntu
- ubuntu10.04 build android-2.3.4错误解决
- Build the Android work environment in Ubuntu Linux
- Build the Android work environment in Ubuntu Linux
- Build android development platform in Ubuntu 10.04
- Build Linux/Android development platform in Ubuntu 10.04
- how to build a android environment in ubuntu 15.10
- android x86 Download、 Buildnig and Running
- How to setup LTib and compile packages in Ubuntu 11.10
- ubuntu 11.10 (64bit) install opencv 2.4.8 and run in Qtcreator
- android NDK install and config in ubuntu
- Android: How to download the latest zip Android Source Code easily and using it in Intellij
- Install ADB And Fastboot Android Tools In Ubuntu Via PPA
- 在 ubuntu 11.10 中build android 源码
- To Install Android Studio in Ubuntu 16.04 and Ubuntu 17.04
- How to Build and Run Android L 64-bit ARM in QEMU
- Builds different channels of code in Android Studio and Eclipse.