First, the environment Ubuntu 15.10, install the necessary packages:
sudo Install Unzip Zip gawk gperf cmake
Second, configure the Android environment:
After configuring the latest Java environment,
Export JAVA-HOME=/<JAVA-PATH>/JDK1. 8 . 0_51export classpath=.: $java-home/lib: $java-home/jre/libexport Path= $path: $java-home/bin:$ Java-home/jre/bin
Install the latest ANDROID-NDK, currently the latest version of R10E,
Configuring the NDK Path
Export android-ndk=/<ndk-path>/android-ndk-r10d
Finally configure the ANDROID-SDK path
Export Android-sdk=/<sdk-path>/android-sdk-linux
Third, compile the independent toolchain
To compile the arm platform:
$ cd <android-ndk> ls platforms $ cd build/Tools $. /make-standalone-toolchain. sh --ndk-dir=. /.. / --Install-dir=<android-toolchain-arm>/android- -- platform=android---toolchain=arm-linux-androideabi-4.8
Compiling the x86 platform:
<android-ndk> ls platforms $ cd build/Tools $. /make-standalone-toolchain. sh --ndk-dir=. /.. / --Install-dir=<android-toolchain-x86>/android- -- platform=android---toolchain=x86-4.8 --arch=x86--system=linux-x86_64
Iv. Generating signatures
$ keytool-genkey-keystore ~/.android/debug.keystore-v-alias "cn=android debug,o=android , C=us" -keypass 204810000
Five, download the source code
$ cd $HOME $ git clone git://github.com/xbmc/xbmc.git kodi-android $ CD kodi-android --init addons/skin.re-touched
Vi. Compiling dependent libraries
$ cd $HOME/kodi-android/tools/depends -xdf $. /bootstrap $. /configure--with-toolchain=/<toolchain-path>/android-toolchain/android- --host= Arm-linux-androideabi--with-sdk-path=/<sdk-path>/sdk--with-ndk=/<ndk-path>/android-ndk-r10e -- With-tarballs=/<set-tarballs-path>/xbmc-tarballs--prefix=/<set-deps-path>/xbmc-deps
$make-j1
The Xbmc-tarballs directory will download many of the packages required for compiling, and XBMC is the compiled dependent library.
This place is easy to make mistakes, the first compile general with make-j1, you can rule out the error, if the error in the directory to execute git clean restart the compilation
Vii. Compile XBMC Build apk
$ cd $HOME/kodi-android make-c tools/depends/target/XBMC make make apk
Compilation of Xbmc-android