Precautions for compiling android in Ubuntu:
1. See the installation instructions in http://source.android.com.
2. For problems encountered during jdk6 installation, refer to issue.
3. If a timeout error occurs during code download, see http://www.cppblog.com/fwxjj/archive/2012/05/17/175198.html:
- Log on to https://android.googlesource.com/new-passwordin the browser and use the gmailaccount number for logon;
- Click "Allow access" on the page to get a similar: Machine android.googlesource.com login Git-<username> .gmail.com password <password> machine android-review.googlesource.com login Git-<username> .gmail.com password <password>
- Append the above information ~ /. The End Of The netrc file (check the permissions of the current user. If this file does not exist, create one by yourself );
- Uri changed to https://android.googlesource.com//Platform/manifest ("/a" is added in the middle ").
- Repo init-u https://android.googlesource.com/a/platform/manifest-B android-2.3.3_r1
- Repo sync
4. A Java version error occurs during compilation. Please refer to step 2 to reinstall and configure JDK
5. If gcc4.6.1 is used in the new Ubuntu version, compilation errors may occur. For details, see http://blog.csdn.net/flydream0/article/details/7046612.
Sudo apt-Get install gcc-4.4
Sudo apt-Get install g ++-4.4
Sudo mv gcc. Bak
Sudo ln-s gcc-4.4 gcc
/Usr/bin $ sudo MV g ++. Bak
/Usr/bin $ sudo ln-s g ++-4.4g ++
Gcc-V
G ++-V
6.
Ubuntu 64-bit environment Android compilation error http://blog.csdn.net/lmhgen/article/details/7326083