`
jacky-zhang
  • 浏览: 316758 次
  • 性别: 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"正是这样一款专为...

    dex-tools-2.1-SNAPSHOT.zip

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

    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文件中声明对应的依赖。...

    dex-tools-2.1.rar

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

    dex-tools-2.1-SNAPSHOT.rar

    《dex-tools-2.1-SNAPSHOT.rar》是一款专门用于Android应用反编译的工具包,它的出现是为了帮助开发者和安全研究人员对APK文件进行深入分析。在Android系统中,Dex文件是应用程序的主要组成部分,它包含了应用的字节...

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

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

    dex-tools-2.1 工具包.zip

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

    android-2.1-src

    【标题】"android-2.1-src" 指的是Android操作系统的2.1版本的源代码。在Android系统开发中,源代码是至关重要的,它揭示了系统的内部工作原理,为开发者提供了深入理解Android系统架构和功能实现的途径。 【描述】...

    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,...

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

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

    dex2jar-2.1-nightly-28.zip

    标题“dex2jar-2.1-nightly-28.zip”指的是一个特定版本的dex2jar工具的归档文件,这个版本是2.1的夜间构建版本,编号为28。dex2jar是一个开放源码的Java工具,主要用于将Dalvik执行格式(.dex)的文件转换为Java...

    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代码相结合,允许...

    rsvp-patch-ns-2.1b8.tar.gz_RSVP_ns-2.1b8_patch wfq NS_rsvp patch

    《RSVP与WFQ在NS-2.1b8中的增强与应用》 网络模拟器(Network Simulator,简称NS)...在实际操作中,用户需要解压这个文件,然后按照说明将补丁应用到NS-2.1b8的源代码中,重新编译和安装,以体验这些改进带来的效果。

    交叉编译arm Linux环境下的android-tools-adb

    交叉编译arm Linux环境下的android-tools-adb工具,本资源包含了完整的Ubuntu1604平台下的android-tools-adb源码包,openssl源码包,zlib源码包。以及完整的编译说明和指导,按照说明操作,可以轻松生成arm平台下可...

    dex2jar-2.1-SNAPSHOT

    【dex2jar-2.1-SNAPSHOT】是一款在Android逆向工程领域广泛使用的工具,主要用于将Dalvik可执行文件(.dex)转换为Java字节码格式的.jar文件。这个过程被称为dex到jar的转换,是分析和理解Android应用程序APK文件...

    dex-tools-2.1-SNAPSHOT.tar

    dex2jar 反编译apk 报错 error.zip 的解决 打开 error.zip,报错内容为:java.lang.RuntimeException: can not merge I and Z 解决:需要自己编译 dex2jar,附件是我自己编译的dex2jar

Global site tag (gtag.js) - Google Analytics