How to compile Android 2.3 on Ubuntu 10.04 32bit

1:issue "You are attempting to build on a 32-bit system"

How to fix:
$ vim build/core/main.mk
change
ifneq (64,$(findstring 64,$(build_arch)))
to
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


external/clearsilver/cgi/Android.mk,
external/clearsilver/java-jni/Android.mk,
external/clearsilver/util/Android.mk,
external/clearsilver/cs/Android.mk

change
LOCAL_CFLAGS += -m64
LOCAL_LDFLAGS += -m64
to
LOCAL_CFLAGS += -m32
LOCAL_LDFLAGS += -m32


2:issue "host C: libclearsilver-jni <= external/clearsilver/java-jni/j_neo_util.c
In file included from /usr/include/features.h:378,
from /usr/include/string.h:26,
from external/clearsilver/java-jni/j_neo_util.c:1:
/usr/include/gnu/stubs.h:9:27: error: gnu/stubs-64.h: 没有那个文件或目录
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libclearsilver- jni_intermediates/j_neo_util.o]错误"

How to fix:
sudo apt-get install lib64z1-dev libc6-dev-amd64 g++-multilib lib64stdc++6


3:issue:
host SharedLib: libneo_util (out/host/linux-x86/obj/lib/libneo_util.so)
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.3.4/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.3.4/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.3.4/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.3.4/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/lib/libneo_util.so] Error 1

How to fix:



4
frameworks/base/core/java/android/app/ListActivity.java:319: inconvertible types
found : android.widget.AdapterView<capture of ?>
required: android.widget.ListView
onListItemClick((ListView)parent, v, position, id);
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

How to fix:
其实JDK的版本低了,用了 1.5.0_06的版本,用1.6就可以了


Reference:
http://iopenfree.appspot.com/?p=4001
http://0123.blog.163.com/blog/static/478831201061214128901/

更多相关文章

  1. 转:android 实现 流媒体 播放远程mp3文件 代码
  2. Android中自定义通用Json解释器
  3. Android(安卓)Gson 解析泛型报错
  4. Android打Jar包注意事项
  5. Android(安卓)系统名字、版本、API level的对应关系
  6. android 6.0系统 make otapackage 错误
  7. android 仿微信5版本实现滑动导航条
  8. android 播放Raw文件夹下的音乐文件
  9. NPM 和webpack 的基础使用

随机推荐

  1. Docker compose 配置 Snipe IT 练习
  2. C语言数据存储
  3. js的增删查改的DOM操作
  4. 2021-04-07:给定一个非负数组arr,长度为N,那
  5. 苹果iPhone 12 Pro丢了或被偷了怎么定位
  6. 【js效果】下拉菜单
  7. 史上最全最新微信小程序自动化教程
  8. 20210221-2 软件管理与网络管理
  9. 【js效果】屏蔽鼠标右键
  10. 支付宝支付--沙箱支付教程+案例 | PC端网