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?
- Java.util.zip. zipexception: duplicate entry: hyts_foo.c
- At java.util.zip. zipoutputstream. putnextentry (zipoutputstream. Java: 175)
- At java. util. Jar. jaroutputstream. putnextentry (jaroutputstream. Java: 92)
- At sun. Tools. Jar. Main. AddFile (main. Java: 713)
- At sun. Tools. Jar. Main. Update (main. Java: 567)
- At sun. Tools. Jar. Main. Run (main. Java: 202)
- At sun. Tools. Jar. Main. Main (main. Java: 1149)
- Make: *** [out/target/common/obj/java_libraries/core-tests_intermediates/javalib. jar] Error 1
- 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?
- Java.util.zip. zipexception: duplicate entry: staffns. xml
- At java.util.zip. zipoutputstream. putnextentry (zipoutputstream. Java: 175)
- At java. util. Jar. jaroutputstream. putnextentry (jaroutputstream. Java: 92)
- At sun. Tools. Jar. Main. AddFile (main. Java: 713)
- At sun. Tools. Jar. Main. Update (main. Java: 567)
- At sun. Tools. Jar. Main. Run (main. Java: 202)
- At sun. Tools. Jar. Main. Main (main. Java: 1149)
- Make: *** [out/target/common/obj/java_libraries/core-tests_intermediates/javalib. jar] Error 1
- 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?
- Java.util.zip. zipexception: duplicate entry: staff2.dtd
- At java.util.zip. zipoutputstream. putnextentry (zipoutputstream. Java: 175)
- At java. util. Jar. jaroutputstream. putnextentry (jaroutputstream. Java: 92)
- At sun. Tools. Jar. Main. AddFile (main. Java: 713)
- At sun. Tools. Jar. Main. Update (main. Java: 567)
- At sun. Tools. Jar. Main. Run (main. Java: 202)
- At sun. Tools. Jar. Main. Main (main. Java: 1149)
- Make: *** [out/target/common/obj/java_libraries/core-tests_intermediates/javalib. jar] Error 1
- 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?
- Java.util.zip. zipexception: duplicate entry: xhtml1-strict.dtd
- At java.util.zip. zipoutputstream. putnextentry (zipoutputstream. Java: 175)
- At java. util. Jar. jaroutputstream. putnextentry (jaroutputstream. Java: 92)
- At sun. Tools. Jar. Main. AddFile (main. Java: 713)
- At sun. Tools. Jar. Main. Update (main. Java: 567)
- At sun. Tools. Jar. Main. Run (main. Java: 202)
- At sun. Tools. Jar. Main. Main (main. Java: 1149)
- Make: *** [out/target/common/obj/java_libraries/core-tests_intermediates/javalib. jar] Error 1
- Make: *** deleting file 'out/target/common/obj/java_libraries/core-tests_intermediates/javalib. jar'
- 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?
- Java.util.zip. zipexception: duplicate entry: staff2.xml
- At java.util.zip. zipoutputstream. putnextentry (zipoutputstream. Java: 175)
- At java. util. Jar. jaroutputstream. putnextentry (jaroutputstream. Java: 92)
- At sun. Tools. Jar. Main. AddFile (main. Java: 713)
- At sun. Tools. Jar. Main. Update (main. Java: 567)
- At sun. Tools. Jar. Main. Run (main. Java: 202)
- At sun. Tools. Jar. Main. Main (main. Java: 1149)
- Make: *** [out/target/common/obj/java_libraries/core-tests_intermediates/javalib. jar] Error 1
- 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?
- Java.util.zip. zipexception: duplicate entry: hc_staff.xml
- At java.util.zip. zipoutputstream. putnextentry (zipoutputstream. Java: 175)
- At java. util. Jar. jaroutputstream. putnextentry (jaroutputstream. Java: 92)
- At sun. Tools. Jar. Main. AddFile (main. Java: 713)
- At sun. Tools. Jar. Main. Update (main. Java: 567)
- At sun. Tools. Jar. Main. Run (main. Java: 202)
- At sun. Tools. Jar. Main. Main (main. Java: 1149)
- Make: *** [out/target/common/obj/java_libraries/core-tests_intermediates/javalib. jar] Error 1
- 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?
- Java.util.zip. zipexception: duplicate entry: staff. xml
- At java.util.zip. zipoutputstream. putnextentry (zipoutputstream. Java: 175)
- At java. util. Jar. jaroutputstream. putnextentry (jaroutputstream. Java: 92)
- At sun. Tools. Jar. Main. AddFile (main. Java: 713)
- At sun. Tools. Jar. Main. Update (main. Java: 567)
- At sun. Tools. Jar. Main. Run (main. Java: 202)
- At sun. Tools. Jar. Main. Main (main. Java: 1149)
- Make: *** [out/target/common/obj/java_libraries/core-tests_intermediates/javalib. jar] Error 1
- 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?
- Java.util.zip. zipexception: duplicate entry: staff. DTD
- At java.util.zip. zipoutputstream. putnextentry (zipoutputstream. Java: 175)
- At java. util. Jar. jaroutputstream. putnextentry (jaroutputstream. Java: 92)
- At sun. Tools. Jar. Main. AddFile (main. Java: 713)
- At sun. Tools. Jar. Main. Update (main. Java: 567)
- At sun. Tools. Jar. Main. Run (main. Java: 202)
- At sun. Tools. Jar. Main. Main (main. Java: 1149)
- Make: *** [out/target/common/obj/java_libraries/core-tests_intermediates/javalib. jar] Error 1
- 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?
- Java.util.zip. zipexception: duplicate entry: staffns. DTD
- At java.util.zip. zipoutputstream. putnextentry (zipoutputstream. Java: 175)
- At java. util. Jar. jaroutputstream. putnextentry (jaroutputstream. Java: 92)
- At sun. Tools. Jar. Main. AddFile (main. Java: 713)
- At sun. Tools. Jar. Main. Update (main. Java: 567)
- At sun. Tools. Jar. Main. Run (main. Java: 202)
- At sun. Tools. Jar. Main. Main (main. Java: 1149)
- Make: *** [out/target/common/obj/java_libraries/core-tests_intermediates/javalib. jar] Error 1
- Make: *** deleting file 'out/target/common/obj/java_libraries/core-tests_intermediates/javalib. jar'
The solution is the same as above.