1. Question 1:/bin/bash: bison: The command is not found.
Solution: $ sudo apt-get install bison
2. Question 2:
You are attempting to build with the incorrect version of java.
Your version is:/bin/bash: java: The command is not found.
The correct version is 1.5.
Solution:
Note: JDK 1.5 must be used. Other versions such as 1.6 cannot be used.
(1) download
Download jdk-1_5_0_22-linux-i586.bin on sun official website. Note not a jdk-1_5_0_22-linux-i586rpm.bin
(2) Deployment
Go to jdk-1_5_0_22-linux-i586.bin directory
Cd ~
Grant the binfile executable attributes
Chmod + x jdk-1_5_0_22-linux-i586.bin
Press enter to skip the protocol to the last line:
Do you agree to the above license terms? [Yes or no]
Enter yes and press enter to start decompression. Decompress the package to the jdk1.5.0 _ 22 directory in the current directory by default.
(3) Configure Environment Variables
Run $ gedit ~ /. Bashrc open the. bashrc file.
Modify the./bashrc file and add
# Set java environment
JAVA_HOME = "your path"/jdk1.5.0 _ 10
Export JRE_HOME = "your path"/jdk1.5.0 _ 10/jre
Export CLASSPATH =.: $ JAVA_HOME/lib: $ JRE_HOME/lib: $ CLASSPATH
Export PATH = $ JAVA_HOME/bin: $ JRE_HOME/bin: $ PATH
Save and close the file.
Execute source ~ on the terminal ~ /. Bashrc refresh the configuration
Use java-version to check whether JDK is correctly configured.
3. Question 3:
Host c ++: libhost <= build/libs/host/pseudo dolocalize. cpp/bin/bash: g ++: Command not found
Make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudo localize. o] Error 127
Solution: $ sudo apt-get install build-essential
4. Question 4:
External/clearsilver/cgi. c: 22: 18: Fatal error: zlib. h: No file or directory compilation terminal.
Make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_cgi_intermediates/cgi. o] Error 1
Solution: $ sudo apt-get install zlib1g-dev
5. Question 5:
Make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/appt] Error 1
Solution:
Open the Android. mk File
$ Gedit frameworks/base/tools/aapt/Android. mk
Edit the following line:
Ifeq ($ (HOST_ OS), linux)
# LOCAL_LDLIBS + =-lrt comment out this line and change it to the following line.
LOCAL_LDLIBS + =-lrt-lpthread
Endif
6. Question 6:
Host c: adb <= system/core/adb/fdevent. c
Host Executable: adb (out/host/linux-86/obj/EXECUTABLES/adb_intermediates/adb)/user/bin/ld: cannot find-lncurses
Collect2: ld returns 1
Make: *** [out/host/linux-86/obj/EXECUTABLES/adb_intermediates/adb] Error 1
Solution: $ sudo apt-get install libncurses5-dev
7. Question 7:
Make: *** [out/target/product/sam9g45/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames. h] Error 25
Solution: $ sudo apt-get install gpert
8. Question 8:
Host C ++: libutils <= frameworks/base/libs/utils/RefBase. cpp
Frameworks/base/libs/utils/RefBase. cpp: In member function 'void android: RefBase: weakref_type: trackMe (bool, bool )':
Frameworks/base/libs/utils/RefBase. cpp: 483: 67: error: passing 'const android: RefBase: weakref_impl 'as 'this 'argument of 'void android: RefBase: weakref_impl: trackMe (bool, bool) 'discards qualifiers [-fpermissive]
Make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase. o] Error 1
Solution:
Open Android. mk
$ Gedit frameworks/base/libs/utils/Android. mk
Set the following line
LOCAL_CFLAGS + =-DLIBUTILS_NATIVE = 1 $ (TOOL_CFLAGS)
Change
LOCAL_CFLAGS + =-DLIBUTILS_NATIVE = 1 $ (TOOL_CFLAGS)-fpermissive
9. Question 9:
Make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_intermediates/android/skin/window. o] Error 1
Solution: $ sudo apt-get install libx11-dev
10. Question 10:
Make: *** [out/host/linux-x86/obj/EXECUTABLES/localize_intermediates/localize] Error 1
Solution:
Open Android. mk:
$ Gedit./framework/base/tools/localize/Android. mk file (note that the file in question 5 is different)
Edit the following line:
Ifeq ($ (HOST_ OS), linux)
# LOCAL_LDLIBS + =-lrt comment out this line and change it to the following line.
LOCAL_LDLIBS + =-lrt-lpthread
11. Question 11:
Make: *** [out/host/linux-x86/obj/EXECUTABLES/accRuntimeTest_intermediates/accRuntimeTest] Error 1
Solution:
Open Android. mk:
$ Gedit system/core/libacc/tests/Android. mk (note that it is not the same file as Question 5 and question 10)
Add the following missing statements:
LOCAL_SHARED_LIBRARIES: = \
Libacc
LOCAL_LDLIBS + =-ldl
LOCAL_MODULE_TAGS: = tests
Add the following missing statement under include $ (BUILD_HOST_EXECUTABLE:
LOCAL_SHARED_LIBRARIES: = \
Libacc
LOCAL_LDLIBS + =-ldl
LOCAL_MODULE_TAGS: = tests
From Peking University-Google Android lab