Ubuntu10.10(64位)编译Android2.3源码 遇到的错误

在Ubuntu10.10(64位)编译Android2.3源码时,遇到各种各样的问题。不是缺这个,就是少那个。现把这些问题和解决方法罗列出来,供大家参考。

错误:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] 错误 1

解决:
  sudo apt-get install libc6-dev-i386 


错误:
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp] error 1

解决:
  sudo apt-get install g++-multilib 


错误:
external/clearsilver/cgi/cgi.c:22: fatal error: zlib.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_cgi_intermediates/cgi.o] Error 1

解决:
sudo apt-get install zlib1g-dev


错误:
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1

解决:
sudo apt-get install lib32z1-dev


错误:
bison -d  -o out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp frameworks/base/tools/aidl/aidl_language_y.y
/bin/bash: bison: command not found
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] Error 127

解决:
sudo apt-get install bison


错误:
Lex: aidl <= frameworks/base/tools/aidl/aidl_language_l.l
/bin/bash: flex: command not found
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Error 127

解决:
sudo apt-get install flex


错误:
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1

解决:
sudo apt-get install lib32ncurses5-dev


错误:
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:55: fatal error: X11/Xlib.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_intermediates/android/main-common.o] Error 1

解决:
sudo apt-get install libx11-dev 


错误:
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'

解决:
sudo apt-get install gperf

 

原文出处http://qq404708194-sina-com.iteye.com/admin/blogs/new

 

 

 

错误:

 

build/core/main.mk:674: *** Module 'AlarmProvider' in PRODUCT_PACKAGES has nothing to install!

 

解决:

 

 

在./build/target/product/large_emu_hw.mk:25:    AlarmProvider 

   ./build/target/product/generic_no_telephony.mk:24:    AlarmProvider   删除AlarmProvider

 

 

 

错误:

 

 

javadoc: 错误 - 在 doclet 类 com.google.doclava.Doclava 中,方法 start 已抛出异常 java.lang.reflect.InvocationTargetException

java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z

 

解决:

 

root 下输入update-alternatives --config javadoc选择模式2 

 

 

 

错误:

 

 

development/tools/emulator/opengl/host/libs/Translator/EGL/../include/EGL/eglplatform.h:98:20: fatal error: GL/glx.h: 没有那个文件或目录

 

解决:

 

sudo apt-get install libgl1-mesa-dev

 

sudo apt-get install tofrodos

sudo apt-get install mingw32

sudo apt-get install ia32-libs

 

ubuntu 配置JDK

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-7-sun/bin/java 300

sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-7-sun/bin/javac 300

sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/java-7-sun/bin/jar 300 

sudo update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/java-7-sun/bin/javah 300 

sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/java-7-sun/bin/javap 300 

sudo update-alternatives --config java 

你可能感兴趣的:(android,ubuntu)