Android system Compilation

Source: Internet
Author: User

Android system Compilation

System ubuntu10.10

2.3 Gingerbread Compilation

1) sudo apt-Get install bison

2) download the jdk-6u27-linux-i586.bin and unzip it. Set Environment Variables
Add
Export java_home =/home/AMX/Java/jdk1.6.0 _ 27
Path =.: $ java_home/bin: $ java_home/JRE/bin: $ path

3)/bin/Bash: G ++: The command cannot be found.
Solution: sudo apt-Get install g ++

4) External/clearsilver/cgi. C: 22: Fatal error: zlib. H: No file or directory
Solution: sudo apt-Get install zlib1g-dev

5)/bin/Bash: Flex: The command cannot be found.
Solution: sudo apt-Get install flex

6)/usr/bin/ld: cannot find-lncurses
Solution: sudo apt-Get install libncurses5-dev

7) prebuilt/linux-x86/SDL/include/SDL/sdl_syswm.h: 55: Fatal error: X11/xlib. H: No file or directory
Solution: sudo apt-Get install libx11-dev

8) Sh: gperf: not found
Solution: sudo apt-Get install gperf

Generation path:
./Out/target/product/generic/ramdisk. img
./Out/target/product/generic/system. img
./Out/target/product/generic/userdata. img
./Prebuilt/Android-arm/kernel-qemu
 

1.5 compile cupcake

1) frameworks/base/tools/aidl/ast. cpp: 10: Error: 'fprintf' was not declared in this scope Error

Solution:

Download gcc-4.3 and G ++-4.3: APT-Get install gcc-4.3 g ++-4.3

More than 10 MB, and then enter/usr/bin

CD/usr/bin

Create a soft connection

Ln-s gcc-4.3 gcc

Ln-s g ++-4.3g ++

Then go to the android directory and execute make.

2) duplicate files are deleted due to an error. Delete the file corresponding to the dom for the file with duplicate XML and Dom Directories

 

1、java.util.zip. zipexception: duplicate entry: hyts_foo.c Error

 

View plainprint?
  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'

 

Solution:

This problem occurs when the hyts_foo.c file is repeated. In the root directory, find the duplicate file and delete it to keep

 

$ 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 again

 

2、java.util.zip. zipexception: duplicate entry: staffns. xml Error

 

View plainprint?
  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'

 

The solution is the same as above.

 

3366java.util.zip. zipexception: duplicate entry: staff2.dtd Error

 

View plainprint?
  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'

 

Same as above

 

4、java.util.zip. zipexception: duplicate entry: xhtml1-strict.dtd Error

 

View plainprint?
  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 Error

 

The solution is the same as above.

5、java.util.zip. zipexception: duplicate entry: staff2.xml Error

 

View plainprint?
  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'

 

The solution is the same as above.

6、java.util.zip. zipexception: duplicate entry: hc_staff.xml error view plainprint?
  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'

 

The solution is the same as above.

7、java.util.zip. zipexception: duplicate entry: staff. xml error view plainprint?
  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'

 

The solution is the same as above.

8w.java.util.zip. zipexception: duplicate entry: staff. DTD error view plainprint?
  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'

 

The solution is the same as above.

9、java.util.zip. zipexception: duplicate entry: staffns. DTD Error

 

View plainprint?
  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'

 

The solution is the same as above.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.