1. Prepare the development environment. The software package to be installed in Ubuntu: composer. JDK5.0, update12orhigher. Java6isnotsupported, becauseofincompatibilitieswith @ Override. // note that the JDK version is 5.0 flex and biso.
1. Prepare the development environment and install the software package in Ubuntu:
Git 1.5.4 or newer and the GNU Privacy Guard.
JDK 5.0, update 12 or higher. Java 6 is not supported, because of incompatibilities with @ Override. // note that the JDK version is 5.0
Flex, bison, gperf, libsdl-dev, libesd0-dev, libwxgtk2.6-dev (optional), build-essential, zip, curl.
The installation and execution commands are as follows:
$ Sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
In addition, valgrind can be installed for finding memory leaks, stack rollback uption, array bounds overflows, and so on.
In Ubuntu 9.10, When you directly use $ sudo apt-get install sun-java5-jdk, installation of Java 5 fails, prompting that no software package is found.
You need to add "/etc/apt/sources. list -->" other software"
Http://cz.archive.ubuntu.com/ubuntu dapper main multiverse
Then install
$ Sudo apt-get update
$ Sudo apt-get install sun-java5-jdk
Then vi. bashrc adds the java environment variable
JAVA_HOME =/usr/lib/jvm/java-1.5.0-sun
PATH = $ JAVA_HOME/bin: $ PATH
CLASSPATH = $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
Export JAVA_HOME
Export PATH
Export CLASSPATH
2. Install Repo
To install, initialize, and configure Repo, follow these steps:
1. Make sure you have ~ /Bindirectory in your home directory, and check to be sure that this bin directory is in your path:
$ Cd ~
$ Mkdir bin
$ Echo $ PATH
2. Download thereposcript and make sure it is executable:
$ Curl http://android.git.kernel.org/repo> ~ /Bin/repo
$ Chmod a + x ~ /Bin/repo
3 Initializing a Repo client
# Create an empty directory to hold your working files:
$ Mkdir mydroid
$ Cd mydroid
# Run "repo init" to bring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest:
$ Repo init-u git: // Android.git.kernel.org/platform/manifest.git
* If you wowould like to check out a branch other than "master", specify it with-B, like:
$ Repo init-u git: // android.git.kernel.org/platform/manifest.git-B cupcake // froyo
4. Download Code
$ Repo sync
5. Compile
$ Cd ~ /Mydroid
$ Make
If compilation fails, "run-java-tool" is missing"
Then $ export ANDROID_JAVA_HOME = $ JAVA_HOME