Android Source Code make Common Errors

Source: Internet
Author: User

1. Download the source code android-2.1_r2, directly make
2. Errors and solutions:
(1)/bin/Bash: bison: Command not found
Solution: 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.
Solution: Install JDK 5.0
1): According to the official document, the source code compilation must use JDK 5 to compile. Therefore, we use JDK 5 here.
2): update the source and run sudo Vim/etc/APT/sources. List on the terminal.
3): copy the following two lines to the end of the document in source. List:
Deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
Deb http://us.archive.ubuntu.com/ubuntu/ jaunty-Updates multiverse
Save and exit.
4): Execute sudo apt-Get update to update the source.
5): configure the compiling environment and download the 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/pseudo localize. O] Error 127
Solution: A @ Ubuntu :~ /Work/android-2.1_r2 $ sudo apt-Get install build-essential
(4) External/clearsilver/cgi. C: 22: 18: Error: zlib. h: no such file or directory
External/clearsilver/cgi. C: In function 'cgi _ compress ':
External/clearsilver/cgi. C: 885: Error: 'z _ stream' undeclared (first use in this function)
External/clearsilver/cgi. C: 885: Error: (each undeclared identifier is reported only once
External/clearsilver/cgi. C: 885: Error: for each function it appears in .)
External/clearsilver/cgi. C: 885: Error: Expected '; 'before' stream'
External/clearsilver/cgi. C: 888: Error: 'stream' undeclared (first use in this function)
External/clearsilver/cgi. C: 888: Error: 'bytef' undeclared (first use in this function)
External/clearsilver/cgi. C: 888: Error: Expected expression before ') 'token
External/clearsilver/cgi. C: 889: Error: 'uint' undeclared (first use in this function)
External/clearsilver/cgi. C: 889: Error: Expected '; 'before' STR'
External/clearsilver/cgi. C: 890: Error: Expected expression before ') 'token
External/clearsilver/cgi. C: 892: Error: 'ullong' undeclared (first use in this function)
External/clearsilver/cgi. C: 892: Error: Expected ') 'before' stream'
External/clearsilver/cgi. C: 895: Error: 'alloc _ func' undeclared (first use in this function)
External/clearsilver/cgi. C: 895: Error: Expected '; 'before numeric constant
External/clearsilver/cgi. C: 896: Error: 'free _ func' undeclared (first use in this function)
External/clearsilver/cgi. C: 896: Error: Expected '; 'before numeric constant
External/clearsilver/cgi. C: 897: Error: 'voidpf 'undeclared (first use in this function)
External/clearsilver/cgi. C: 897: Error: Expected '; 'before numeric constant
External/clearsilver/cgi. C: 900: Error: 'z _ default_compression 'undeclared (first use in this function)
External/clearsilver/cgi. C: 900: Error: 'z _ deflated 'undeclared (first use in this function)
External/clearsilver/cgi. C: 900: Error: 'max _ wbits 'undeclared (first use in this function)
External/clearsilver/cgi. C: 900: Error: 'z _ default_strategy 'undeclared (first use in this function)
External/clearsilver/cgi. C: 901: Error: 'z _ OK 'undeclared (first use in this function)
External/clearsilver/cgi. C: 904: Error: 'z _ finish 'undeclared (first use in this function)
External/clearsilver/cgi. C: 905: Error: 'z _ stream_end 'undeclared (first use in this function)
External/clearsilver/cgi. C: In function 'cgi _ output ':
External/clearsilver/cgi. C: 1200: Error: 'z _ null' undeclared (first use in this function)
External/clearsilver/cgi. C: 1201: Error: Expected ') 'before' bytef'
External/clearsilver/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
Solution: 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
Solution: 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
Solution: 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 encoded ded 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
Solution: 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'
Solution: A @ Ubuntu :~ /Work/android-2.1_r2 $ sudo apt-Get install gperf

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.