ubuntu10.04编译android2.3.3出现的问题

本文介绍如何在Ubuntu系统上搭建32位Android编译环境,包括必要的环境变量配置及解决编译过程中遇到的问题,如安装依赖包等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

以root登陆ubuntu.

因为是用32位系统来编译,在android src中需要作如下修改。

1>. build/core===>main.mk中的

ifneq (64,$(findstring 64,$(build_arch)))

改为  ifneq (i686,$(findstring i686,$(build_arch)))

2>. /external/clearsilver/cgi/Android.mk

     /external/clearsilver/cs/Android.mk

     /external/clearsilver/java-jni/Android.mk
     /external/clearsilver/util/Android.mk中的
 LOCAL_CFLAGS += -m64
LOCAL_LDFLAGS += -m64
改为:LOCAL_CFLAGS += -m32
          LOCAL_CFLAGS += -m32

make编译中遇到问题解决如下:

1>. /bin/bash: bison: command not found

====>>apt-get install bison

2>. /bin /bash: g++: command not found

====>apt-get install build-essential

3>. external/clearsilver/cgi /cgi.c:22:18: error: zlib.h: No such file or directory
external/clearsilver/cgi/cgi.c: In function ‘cgi_compress’:

..........

=====>apt-get install zlib1g-dev

4>. /bin/bash: flex: command not found

=====>apt-get install flex

5>. /usr/bin/ld: cannot find -lncurses

=====>apt-get install libncurses-dev

6>.prebuilt/linux-x86/sdl /include/SDL/SDL_syswm.h:55:22: error: X11/Xlib.h: No such file or directory
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:56:23: error: X11/Xatom.h: No such file or directory
In file included from external/qemu/android/skin/window.c:19:

======>apt-get install libx11-dev

7>. Install: out/target/product/generic/system/lib/libttssynthproxy.so
Generating CSSPropertyNames.h <= CSSPropertyNames.in
sh: gperf: not found
calling gperf failed: 32512 at ./makeprop.pl line 96.
make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h] Error 25
make: *** Deleting file `out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h'

======>apt-get install gperf

编译成功后设置如下环境变量:

export PATH=$PATH:/Android/android2.3.3/out/host/linux-x86/bin  

export ANDROID_PRODUCT_OUT=/Android/android2.3.3/out/target/product/generic

就可以使用emulator运行模拟器了.

fastboot android10版本 ubuntu linux平台 fastboot version 28.0.2-PD02.200305.0422 $ fastboot -h usage: fastboot [OPTION...] COMMAND... flashing: update ZIP Flash all partitions from an update.zip package. flashall Flash all partitions from $ANDROID_PRODUCT_OUT. On A/B devices, flashed slot is set as active. Secondary images may be flashed to inactive slot. flash PARTITION [FILENAME] Flash given partition, using the image from $ANDROID_PRODUCT_OUT if no filename is given. basics: devices [-l] List devices in bootloader (-l: with device paths). getvar NAME Display given bootloader variable. reboot [bootloader] Reboot device. locking/unlocking: flashing lock|unlock Lock/unlock partitions for flashing flashing lock_critical|unlock_critical Lock/unlock &#39;critical&#39; bootloader partitions. flashing get_unlock_ability Check whether unlocking is allowed (1) or not(0). advanced: erase PARTITION Erase a flash partition. format[:FS_TYPE[:SIZE]] PARTITION Format a flash partition. set_active SLOT Set the active slot. oem [COMMAND...] Execute OEM-specific command. gsi wipe|disable Wipe or disable a GSI installation (fastbootd only). boot image: boot KERNEL [RAMDISK [SECOND]] Download and boot kernel from RAM. flash:raw PARTITION KERNEL [RAMDISK [SECOND]] Create boot image and flash it. --dtb DTB Specify path to DTB for boot image header version 2. --cmdline CMDLINE Override kernel command line. --base ADDRESS Set kernel base address (default: 0x10000000). --kernel-offset Set kernel offset (default: 0x00008000). --ramdisk-offset Set ramdisk offset (default: 0x01000000)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值