android 源码编译遇到得一些问题
来源:互联网 发布:teradata数据库考试 编辑:程序博客网 时间:2024/05/01 10:36
转自http://blog.csdn.net/marlene0312/article/details/6165119
开发环境是fedora14 2.6.35.10-74.fc14.i686
android源码得获取和编译看官网链接
http://source.android.com/source/download.html
1.执行build/envsetup.sh脚本,配置环境变量
2.网上搜索到的
在使用:
$ repo init -u git://Android.git.kernel.org/platform/manifest.git
$ repo sync
下载完代码后,进行make,
$cd ~/mydroid
$make
却出现了如下错误:
build/core/main.mk:73: You are attempting to build on a 32-bit system.
build/core/main.mk:74: Only 64-bit build environments are supported beyond froyo/2.2.
这是因为froyo/2.2默认只支持64-bit,看到有些网友还要去下载64-比他的操作系统,很是麻烦,于是通过不断搜索资料终于解决,
解决办法:
需要进行如下修改即可,
将
./external/clearsilver/cgi/Android.mk
./external/clearsilver/java-jni/Android.mk
./external/clearsilver/util/Android.mk
./external/clearsilver/cs/Android.mk
四个文件中的
LOCAL_CFLAGS += -m64
LOCAL_LDFLAGS += -m64
注释掉,或者将“64”换成“32”
LOCAL_CFLAGS += -m32
LOCAL_LDFLAGS += -m32
然后,将
./build/core/main.mk 中的
ifneq (64,$(findstring 64,$(build_arch)))
改为:
ifneq (i686,$(findstring i686,$(build_arch)))
3./bin/gperf库出错
解决:安装gperf库
4.make: *** [out/target/common/docs/api-stubs-timestamp] 错误 45
解决:
make cleanmake update-api
make
5.安装jdk1.5.0.22的包,重新编译。
Which version of JDK should I use to build Android?
A: Only JDK 5.0.12 - 5.0.22 can be used to build Android. If you already installed JDK 6, you need download and install the JDK 5 from here and export the JDK 5 path to build Android.
6.make: *** [out/host/linux-x86/obj/EXECUTABLES/vm-tests_intermediates/tests] Error 1
解决: You can add the following lines to the end of the file /etc/security/limits.conf(before the line # End of file)
* soft nofile 8192 * hard nofile 8192
and reboot. You can check whether your modification takes effect or not by "ulimit -n".
OK!问题解决
Can I use a emulator to develop for AT91 devices?
A: Yes. The Android SDK provided a set of tools to run a customized image. Please see below the steps:
- After finish compiling Android4SAM you can find three .img files in
out/target/product/sam9m10
- system.img
- The initial system image.
- ramdisk.img
- The ramdisk image used to boot the system
- userdata.img
- The initial user data image (see below)
- kernel-qemu
- The emulator-specific Linux kernel image
- system.img
If the kernel image is not found in the out
directory, you may find it in/prebuilt/android-arm/kernel
- Copy those images in a directory.
- Use command to start a emulator based on our own images by typing following command:
$ out/host/linux-x86/bin/emulator -kernel kernel-qemu -ramdisk ramdisk.img -system system.img -data userdata.img
- android 源码编译遇到得一些问题
- android 源码编译遇到得一些问题
- 编译android源码及遇到的问题
- 编译android源码遇到问题与解决方法
- 编译android源码遇到的问题
- 编译android源码遇到的问题
- 编译Android源码遇到的一个问题
- ubuntu配置android开发环境和编译源码遇到的一些问题
- ubuntu配置android开发环境和编译源码遇到的一些问题
- 交叉编译遇到一些问题
- 编译IJKPlayer android版时遇到的一些问题
- Android 7.0编译的遇到的一些问题
- android 源码下载过程中遇到的一些问题
- 编译源码遇到的问题
- ubuntu9.04下编译android源码遇到的问题
- 编译android源码所遇到的问题收集
- Android 4.4源码编译以及遇到的小问题
- Ubuntu12.04 编译android 源码 遇到的问题
- VS系统通用快捷键
- Oracle客户端精简绿色版
- OOAD&设计模式,学习点
- Android基础教程(四)之-----取得手机屏幕大小DisplayMetrics的应用
- 从头开始学习JSP(3)——一些配置
- android 源码编译遇到得一些问题
- ARM裸机程序研究 - 编译和链接
- 零拷贝与 sendfile
- Excel - VLOOKUP
- python之类的构造和析构函数
- jQuery 事件 - ready() 方法
- Shitter:把你的微博变成厕所卷纸
- linux xargs用法
- IOS面试题详解(一)