zoukankan      html  css  js  c++  java
  • android 的系统编译


    android 的系统编译

    系统 ubuntu10.10

    2.3 gingerbread的编译

    1)sudo apt-get install bison

    2)下载jdk-6u27-linux-i586.bin,解压。设置环境变量
    在/etc/profile 后面添加
    export JAVA_HOME=/home/amx/java/jdk1.6.0_27
    PATH=.:$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH

    3)/bin/bash: g++:找不到命令
    解决:sudo apt-get install g++

    4)external/clearsilver/cgi/cgi.c:22: fatal error: zlib.h: 没有那个文件或目录
    解决:sudo apt-get install zlib1g-dev

    5)/bin/bash: flex:找不到命令
    解决:sudo apt-get install flex

    6)/usr/bin/ld: cannot find -lncurses
    解决:sudo apt-get install libncurses5-dev 

    7)prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:55: fatal error: X11/Xlib.h: 没有那个文件或目录
    解决:sudo apt-get install libx11-dev 

    8)sh: gperf: not found
    解决:sudo apt-get install gperf

    生成路径:
    ./out/target/product/generic/ramdisk.img
    ./out/target/product/generic/system.img
    ./out/target/product/generic/userdata.img
    ./prebuilt/android-arm/kernel/kernel-qemu
     

    1.5 cupcake 的编译

    1)frameworks/base/tools/aidl/AST.cpp:10: error: 'fprintf' was not declared in this scope的错误

      解决办法:

      下载gcc-4.3和g++-4.3:  apt-get install gcc-4.3 g++-4.3

      大约十多兆,然后进入/usr/bin

      cd /usr/bin

      建个软连接

      ln -s gcc-4.3 gcc

      ln -s g++-4.3 g++

      然后进入android目录下,执行make,就可以了。

    2)重复文件的错误 ,删除重复的文件。对于xml 和dom 目录重复的文件 删除dom对应的文件

    1、java.util.zip.ZipException: duplicate entry: hyts_Foo.c 错误

    1. java.util.zip.ZipException: duplicate entry: hyts_Foo.c  
    2.         at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:175)  
    3.         at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:92)  
    4.         at sun.tools.jar.Main.addFile(Main.java:713)  
    5.         at sun.tools.jar.Main.update(Main.java:567)  
    6.         at sun.tools.jar.Main.run(Main.java:202)  
    7.         at sun.tools.jar.Main.main(Main.java:1149)  
    8. make: *** [out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar] Error 1  
    9. make: *** Deleting file `out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar'  

    解决办法:

    这个问题是hyts_Foo.c文件重复,在根目录查找哪里重复,然后将其删除保留一个

    $ find . -name hyts_Foo.c

    ./libcore/luni/src/test/resources/hyts_Foo.c

    ./libcore/support/src/test/resources/hyts_Foo.c

    $ rm libcore/luni/src/test/resources/hyts_Foo.c

    再次 make 即可

    2、java.util.zip.ZipException: duplicate entry: staffNS.xml 错误

    1. java.util.zip.ZipException: duplicate entry: staffNS.xml  
    2.         at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:175)  
    3.         at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:92)  
    4.         at sun.tools.jar.Main.addFile(Main.java:713)  
    5.         at sun.tools.jar.Main.update(Main.java:567)  
    6.         at sun.tools.jar.Main.run(Main.java:202)  
    7.         at sun.tools.jar.Main.main(Main.java:1149)  
    8. make: *** [out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar] Error 1  
    9. make: *** Deleting file `out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar'  

    解决办法同上

    3、java.util.zip.ZipException: duplicate entry: staff2.dtd 错误

    1. java.util.zip.ZipException: duplicate entry: staff2.dtd  
    2. at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:175)  
    3. at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:92)  
    4. at sun.tools.jar.Main.addFile(Main.java:713)  
    5. at sun.tools.jar.Main.update(Main.java:567)  
    6. at sun.tools.jar.Main.run(Main.java:202)  
    7. at sun.tools.jar.Main.main(Main.java:1149)  
    8. make: *** [out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar] Error 1  
    9. make: *** Deleting file `out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar'  

    同上

    4、java.util.zip.ZipException: duplicate entry: xhtml1-strict.dtd错误

    1. java.util.zip.ZipException: duplicate entry: xhtml1-strict.dtd  
    2.         at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:175)  
    3.         at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:92)  
    4.         at sun.tools.jar.Main.addFile(Main.java:713)  
    5.         at sun.tools.jar.Main.update(Main.java:567)  
    6.         at sun.tools.jar.Main.run(Main.java:202)  
    7.         at sun.tools.jar.Main.main(Main.java:1149)  
    8. make: *** [out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar] Error 1  
    9. make: *** Deleting file `out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar'  
    10. java.util.zip.ZipException: duplicate entry: staff2.xml 错误  

    解决办法同上

    5、java.util.zip.ZipException: duplicate entry: staff2.xml错误

    1. java.util.zip.ZipException: duplicate entry: staff2.xml  
    2.         at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:175)  
    3.         at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:92)  
    4.         at sun.tools.jar.Main.addFile(Main.java:713)  
    5.         at sun.tools.jar.Main.update(Main.java:567)  
    6.         at sun.tools.jar.Main.run(Main.java:202)  
    7.         at sun.tools.jar.Main.main(Main.java:1149)  
    8. make: *** [out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar] Error 1  
    9. make: *** Deleting file `out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar'  

    解决办法同上

    6、java.util.zip.ZipException: duplicate entry: hc_staff.xml 错误

    1. java.util.zip.ZipException: duplicate entry: hc_staff.xml  
    2.         at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:175)  
    3.         at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:92)  
    4.         at sun.tools.jar.Main.addFile(Main.java:713)  
    5.         at sun.tools.jar.Main.update(Main.java:567)  
    6.         at sun.tools.jar.Main.run(Main.java:202)  
    7.         at sun.tools.jar.Main.main(Main.java:1149)  
    8. make: *** [out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar] Error 1  
    9. make: *** Deleting file `out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar'  

    解决办法同上

    7、java.util.zip.ZipException: duplicate entry: staff.xml 错误

    1. java.util.zip.ZipException: duplicate entry: staff.xml  
    2.         at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:175)  
    3.         at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:92)  
    4.         at sun.tools.jar.Main.addFile(Main.java:713)  
    5.         at sun.tools.jar.Main.update(Main.java:567)  
    6.         at sun.tools.jar.Main.run(Main.java:202)  
    7.         at sun.tools.jar.Main.main(Main.java:1149)  
    8. make: *** [out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar] Error 1  
    9. make: *** Deleting file `out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar'  

    解决办法同上

    8、java.util.zip.ZipException: duplicate entry: staff.dtd 错误

    1. java.util.zip.ZipException: duplicate entry: staff.dtd  
    2.         at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:175)  
    3.         at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:92)  
    4.         at sun.tools.jar.Main.addFile(Main.java:713)  
    5.         at sun.tools.jar.Main.update(Main.java:567)  
    6.         at sun.tools.jar.Main.run(Main.java:202)  
    7.         at sun.tools.jar.Main.main(Main.java:1149)  
    8. make: *** [out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar] Error 1  
    9. make: *** Deleting file `out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar'  

    解决办法同上

    9、java.util.zip.ZipException: duplicate entry: staffNS.dtd 错误

    1. java.util.zip.ZipException: duplicate entry: staffNS.dtd  
    2.         at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:175)  
    3.         at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:92)  
    4.         at sun.tools.jar.Main.addFile(Main.java:713)  
    5.         at sun.tools.jar.Main.update(Main.java:567)  
    6.         at sun.tools.jar.Main.run(Main.java:202)  
    7.         at sun.tools.jar.Main.main(Main.java:1149)  
    8. make: *** [out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar] Error 1  
    9. make: *** Deleting file `out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar'  

    解决办法同上

     
  • 相关阅读:
    HTTP长连接、短连接使用及测试
    递归分治算法之二维数组二分查找(Java版本)
    Java二维数组的概念和使用方法
    java二维数组遍历
    HashMap多线程并发问题分析
    Linux 移动或重命名文件/目录-mv 的10个实用例子
    CSS fixed 定位元素失效的问题
    关于 JavaScript 中的继承
    React 虚拟 DOM 的差异检测机制
    下拉框中选项的快速定位
  • 原文地址:https://www.cnblogs.com/wanqieddy/p/2245638.html
Copyright © 2011-2022 走看看