`
jacky-zhang
  • 浏览: 315674 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

编译android-2.1源码出错及解决方法

阅读更多
先安装组件:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev java-common unixodbc

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 this function)
external/clearsilver/cgi/cgi.c:888: error: expected expression before ‘)’ token
external/clearsilver/cgi/cgi.c:889: error: ‘uInt’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:889: error: expected ‘;’ before ‘str’
external/clearsilver/cgi/cgi.c:890: error: expected expression before ‘)’ token
external/clearsilver/cgi/cgi.c:892: error: ‘uLong’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:892: error: expected ‘)’ before ‘stream’
external/clearsilver/cgi/cgi.c:895: error: ‘alloc_func’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:895: error: expected ‘;’ before numeric constant
external/clearsilver/cgi/cgi.c:896: error: ‘free_func’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:896: error: expected ‘;’ before numeric constant
external/clearsilver/cgi/cgi.c:897: error: ‘voidpf’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:897: error: expected ‘;’ before numeric constant
external/clearsilver/cgi/cgi.c:900: error: ‘Z_DEFAULT_COMPRESSION’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:900: error: ‘Z_DEFLATED’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:900: error: ‘MAX_WBITS’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:900: error: ‘Z_DEFAULT_STRATEGY’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:901: error: ‘Z_OK’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:904: error: ‘Z_FINISH’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:905: error: ‘Z_STREAM_END’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c: In function ‘cgi_output’:
external/clearsilver/cgi/cgi.c:1200: error: ‘Z_NULL’ undeclared (first use in this function)
external/clearsilver/cgi/cgi.c:1201: error: expected ‘)’ before ‘Bytef’
external/clearsilver/cgi/cgi.c:1218: error: ‘Z_DEFLATED’ undeclared (first use in this function)
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_cgi_intermediates/cgi.o] Error 1
解决:a@ubuntu:~/work/android-2.1_r2$ sudo apt-get install zlib1g-dev
(5)/bin/bash: flex: command not found
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Error 127
解决:a@ubuntu:~/work/android-2.1_r2$ sudo apt-get install flex
(6)/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1
解决:a@ubuntu:~/work/android-2.1_r2$ sudo apt-get install libncurses-dev
(7)prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:55:22: error: X11/Xlib.h: No such file or directory
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:56:23: error: X11/Xatom.h: No such file or directory
In file included from external/qemu/android/skin/window.c:19:
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:73: error: expected specifier-qualifier-list before ‘XEvent’
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:86: error: expected specifier-qualifier-list before ‘Display’
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_intermediates/android/skin/window.o] Error 1
解决:a@ubuntu:~/work/android-2.1_r2$ sudo apt-get install libx11-dev
(8)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'
解决:a@ubuntu:~/work/android-2.1_r2$ sudo apt-get install gperf

原文地址http://blog.chinaunix.net/u/22630/showart_2189723.html
分享到:
评论

相关推荐

    rxtx-2.1-7-bins-r2.zip_RXTX-2.1_RXTX-2.1-7pre16_rxtx-2.1-7-bins-

    标题中的"rxtx-2.1-7-bins-r2.zip"是RXTX库的一个特定版本的二进制发行版,这个版本是2.1-7的预发布版本,编号为r2,包含了用于不同平台的编译好的库文件。 RXTX库的核心功能包括但不限于: 1. **跨平台支持**:...

    dex-tools-2.1-SNAPSHOT_dex-tools-2.1_

    《安卓apk反编译工具——dex-tools-2.1详解》 在移动应用开发领域,尤其是在安卓系统上,了解和分析APK文件的内部结构和代码逻辑是开发者、安全研究人员和逆向工程师的重要任务。"dex-tools-2.1"正是这样一款专为...

    android-2.1_r01-windows.zip

    在此次我们讨论的“android-2.1_r01-windows.zip”压缩包中,包含了Android 2.1版本的源代码和相关工具,专为Windows平台设计,便于开发者在Windows环境下进行Android应用的开发和调试。本文将深入探讨Android 2.1...

    jaxws-api-2.1_jaxb-api-2.1.jar

    `jaxws-api-2.1.jar`是这个版本的JAX-WS API的实现,包含了用于编译和运行Web服务所需的类和接口。 **JAXB 2.1** JAXB是Java平台用于XML绑定的规范,它提供了将Java对象和XML数据之间自动转换的能力。通过JAXB,...

    dex-tools-2.1-SNAPSHOT.zip

    【dex-tools-2.1-SNAPSHOT.zip】是一款用于处理Android应用APK中的DEX(Dalvik Executable)文件的工具集。在Android系统中,DEX文件是包含应用程序代码和资源的二进制格式,它是Dalvik虚拟机执行的指令集。这款工具...

    dex-tools-2.1-SNAPSHOT.rar

    标题 "dex-tools-2.1-SNAPSHOT.rar" 指示的是一个包含与Android应用相关的反编译工具的压缩包。这个工具集主要用于处理Dex文件,这是Android应用程序的主要可执行格式。 Dex-tools 2.1-SNAPSHOT 版本可能是一个开发...

    android-sdk-2.1

    Android SDK(Software Development Kit)是Android平台开发的核心工具集,而android-sdk-2.1版本则是针对Android 2.1(Eclair)系统进行开发的重要工具。对于Android开发者来说,理解和掌握这个版本的SDK至关重要,...

    ns-allinone-2.1b9a-old.tar.gz_This Is It_ns-2.1b_ns-2.1b9a_ns-al

    网络模拟是计算机科学领域中至关重要的一个环节,它允许研究人员在虚拟环境中测试和优化网络协议及系统,而ns-allinone-2.1b9a正是这样一款广泛使用的网络模拟工具。这个软件包集合了ns-2.1b9a版本,为网络模拟提供...

    spring-cglib-repack-3.2.0.jar和spring-objenesis-repack-2.1.jar

    解决这个问题的方法通常是将`spring-cglib-repack-3.2.0.jar`和`spring-objenesis-repack-2.1.jar`添加到你的项目构建路径中,如果是Maven或Gradle项目,可以在pom.xml或build.gradle文件中声明对应的依赖。...

    android-2.1-part1

    在这个"android-2.1-part1"的压缩包中,很可能是包含了与Android 2.1相关的源代码、文档、教程或示例项目,便于开发者研究和学习。 首先,我们来了解一下Android 2.1的主要特性: 1. **性能提升**:Android 2.1在...

    dex-tools-2.1.rar

    总的来说,"dex-tools-2.1.rar"提供了一个解决“can not merge I and Z”问题的工具,帮助开发者更有效地进行Android应用的逆向工程和调试。通过理解和使用这个工具,开发者可以更深入地理解Dex文件结构,提高工作...

    dex-tools-2.1-20190905-lanchon.zip

    《dex-tools-2.1-20190905-lanchon:安卓逆向与反编译的利器》 在安卓应用开发的世界里,安全性和隐私保护是至关重要的议题。然而,对于开发者而言,有时需要对已有的APK进行分析、调试或者研究,这就涉及到了安卓...

    dex-tools-2.1 工具包.zip

    "dex-tools-2.1 工具包.zip"是一个专门针对这一需求的工具集,它包含了帮助开发者反编译Java class文件和Android的.dex(Dalvik执行文件)到可读的Java源码的工具。 首先,我们要理解.dex文件的重要性。在Android...

    apktool-install-windows-2.1_r01-1.zip

    apktool-install-windows-2.1_r01-1.zip

    rxtx-2.1-7r2相关安装源码和主流系统库

    **rxtx-2.1-7r2详解** rxtx是一个开源的串行通信库,主要用于Java编程语言。它的全名是“Real Time eXtensions for Java”,为Java应用程序提供了串口(Serial Port)和并口(Parallel Port)通信的能力。rxtx库在...

    qttelnet-2.1_1

    "qttelnet-2.1_1" 是一个软件项目的版本标识,这通常指的是一个特定的、经过测试和发布的软件迭代。在这个情况下,"qttelnet"可能是一个基于Qt库实现的telnet客户端或服务器应用。Qt是一个跨平台的C++图形用户界面...

    jsp-api-2.1.jar最新版

    `jsp-api-2.1.jar`是Java服务器页面(JSP)技术的核心库,主要用于支持JSP 2.1版本的开发。在Java Web应用程序开发中,JSP是一种用于创建动态网页的技术,它将HTML、XML或者其他标记语言与Java代码相结合,允许...

Global site tag (gtag.js) - Google Analytics