ubuntu14.04编android2.3.1的一些坑

2016-07-12 10:27:35来源:oschina作者:qqq12m人点击

1、


apt-cachepolicyname
获得已安装的name的version

2、android 2.3.1在ubuntu14.04上编译的错误


*gcc 不对:安装4.4的gcc和g++


*Zgnote.c报错:用下面的patch


diff --git a/vm/native/dalvik_system_Zygote.c b/vm/native/dalvik_system_Zygote.c index bcc2313..112563a 100644 --- a/vm/native/dalvik_system_Zygote.c +++ b/vm/native/dalvik_system_Zygote.c @@ -21,6 +21,7 @@ #include "native/InternalNativePriv.h"#include +#include #include #include #include


*/usr/bin/ld: cannot find -lcurse


apt-get install lib32ncurses5


*/usr/bin/ld: cannot find -lz


sudo apt-get install lib32z1-dev


*/usr/include/zlib.h:34:19: fatal error: zconf.h: 没有那个文件或目录


有一处少了一个头文件,原因是zlib1g-dev有个头文件修改了路径,及zconf.h放到了/usr/include/x86_64-linux-gnu/,所以将其拷贝到/usr/include/下即可了


*Can't locate Switch.pm in


sudoapt-getinstalllibswitch-perl


*Unknown parameter


gcc版本太高,用update-alternative配置一下


*In file included from /usr/include/stdlib.h:24,from build/tools/acp/acp.c:11: /usr/include/features.h:374: fatal error: sys/cdefs.h: No such file or directory



sudo apt-get install libc6-dev-i386

G++: selected multilib '32' not installed. Problem when installing CACTI G++: selected multilib '32' not installed. Install the multilib for g++ In Ubuntu, we just input



sudo apt-get install g++-multilib However, the g++ we use is not the latest version, it is g++ - 4.4, so we should also install this.
Just sudo apt-get install g++-4.4-multilib






最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台