After repo sync to download the source code, after a long time, finally can proceed to the next step.
You need three more steps before making make.
1> source build/envsetup.sh: Load command
2> Lunch: Choose Platform compilation options
3> Make: Perform compilation
One
Load the commands in the envsetup.sh into the environment variable to complete some initialization.
Two
such as the use of 32-bit Ubuntu system and Android4. A few (specifically not remember the first edition, 0 or 01), the execution of the lunch command error. Of course, these errors can be made after the 32-bit system is modified, can also execute the command, but the process is more cumbersome. I used to be 32-bit, spend a lot of time, how much or some minor problems, and eventually switch to 64-bit, so it is recommended to install the 64-bit Ubuntu system.
Three
MAKE-J4 (based on personal computer conditions)
This is a long process, and there will be a variety of errors in the situation. It is not recommended for individuals to use MAKE-K because error conditions are ignored, and it takes a long time to compile, or not succeed. Still have to come back to find the wrong, solve it.
Error One:
Traceback (most recent):
File "scripts/make_css_property_names.py", line 238, in <module>
In_generator. Maker (Csspropertieswriter). Main (SYS.ARGV)
File "/root/android_src/external/chromium_org/third_party/webkit/source/core/scripts/in_generator.py", line 119, In main
Writer.write_files (Options.output_dir)
File "/root/android_src/external/chromium_org/third_party/webkit/source/core/scripts/in_generator.py", line. Write_files
Self._write_file (Output_dir, Generator (), file_name)
File "scripts/make_css_property_names.py", line 233, in Generate_implementation
Gperf = subprocess. Popen (Gperf_args, stdin=subprocess. PIPE, Stdout=subprocess. PIPE)
File "/usr/lib/python2.7/subprocess.py", line 709, in __init__
Errread, Errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1326, in _execute_child
Raise Child_exception
OSError: [Errno 2] No such file or directory
Make: * * [Out/target/product/generic/obj/gyp/shared_intermediates/blink/csspropertynames.cpp] Error 1
Make: * * is waiting for unfinished tasks ....
Solve:
Ensure that the following environments are installed:
Git GnuPG Flex Bison gperf build-essential Zip curl libc6-dev x11proto-core-dev g++-multilib tofrodos Python-markdo WN libxml2-utils Xsltproc
Error Two:
Ubuntu14.10 compiled ANDROID5 source to libwebviewchromium.so after the stop
Solve:
Reference http://jileniao.net/ubunt-add-swap-to-build-libwebviewchromium.html
Error Three:
Appears: Java,javac: Invalid target version similar case
Solve:
Javac environment is not set, or JAVAC is not installed well.
sudo update-alternatives--config java
sudo update-alternatives--config javac
To view the currently used JDK, if there is a problem, please reset it, switch java or re-download the JDK, and then set the following.
sudo update-alternatives--install/usr/bin/java java/usr/.... (where your JDK is placed)/java 1051
sudo update-alternatives--install/usr/bin/javac javac/usr/.... (where your JDK is placed)/javac 1051
Other errors, refer to http://www.cnblogs.com/tao560532/p/3302444.html
Android Learning--ubuntu under android5.1 source make compile