• 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'  

    解决办法同上

     
  • 相关阅读:
    工厂设计模式
    Java 注解 (Annotation)你可以这样学
    java的多线程和并发库
    NIO高并发基础
    Java编写画图板程序细节-保存已画图形
    程序员必须知道的知识
    慢慢读懂经济【持续更新】-经济浅谈
    Spring IOC与AOP的简单实现
    Python网络爬虫【持续更新】-BeautifulSoup库的使用
    Python网络爬虫【持续更新】-requests库的使用
  • 原文地址:https://www.cnblogs.com/wanqieddy/p/2245638.html
Copyright © 2020-2023  润新知