android 编译源码 错误解决
2010-07-15 20:32:00 来源:WEB开发网Ubuntu9.10默认安装的纯净系统,没装任何其他软件。
1.下载源码android-2.1_r2,直接make
2.出错及解决如下:
(1)/bin/bash: bison: command not found
解决:a@ubuntu:~/work/android-2.1_r2$ sudo apt-get install bison
(2)make: *** No rule to make target `Please-install-JDK-5.0,-update-12-or-higher,-which-you-can-download-from-java.sun.com',
needed by `out/target/common/docs/api-stubs-timestamp'. Stop.
解决:安装JDK 5.0
1):根据官方文档里所说,源代码的编译必须使用JDK5才能编译的了,所以这里我们使用jdk5
2): 需要先更新源,在终端里执行 sudo vim /etc/apt/sources.list
3): 在source.list里把以下2行拷贝到文档最后面:
deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse
保存退出。
4): 执行 sudo apt-get update 更新源.
5): 配置编译环境并下载JDK5:sudo apt-get install sun-java5-jdk
(3)/bin/bash: g++: command not found
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o] Error 127
解决:a@ubuntu:~/work/android-2.1_r2$ sudo apt-get install build-essential
(4)external/clearsilver/cgi/cgi.c:22:18: error: zlib.h: No such file or directory
external/clearsilver/cgi/cgi.c: In function ‘cgi_compress’:
external/clearsilver/cgi/cgi.c:885: error: ‘z_stream’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:885: error: (Each undeclared identifier is reported only once
external/clearsilver/cgi/cgi.c:885: error: for each function it appears in.)
external/clearsilver/cgi/cgi.c:885: error: expected ‘;’ before ‘stream’
external/clearsilver/cgi/cgi.c:888: error: ‘stream’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:888: error: ‘Bytef’ undeclared (first use in
- ››Android 当修改一些代码时,使用什么编译命令可以最...
- ››Android 如何添加一个apk使模拟器和真机都编译进去...
- ››Android 修改Camera拍照的默认保存路径
- ››Android 如何修改默认输入法
- ››android开发中finish()和System.exit(0)的区别
- ››Android手势识别简单封装类
- ››android中查看项目数字证书的两种方法
- ››Android中获取IMEI码的办法
- ››android 相机报错 setParameters failed
- ››Android重启运用程序的代码
- ››Android为ListView的Item设置不同的布局
- ››android bitmap与base64字符串的互相转换
更多精彩
赞助商链接