Build Environment Example: debian wheezy amd64 kde - simlar/simlar-android GitHub Wiki

  • aptitude install openjdk-6-jdk openjdk-6-jre
  • We have to use multiarch.
    • dpkg --add-architecture i386
    • edit /etc/apt/sources.list as follows deb [arch=amd64,i386] http://ftp.de.debian.org/debian/ wheezy main contrib non-free
    • apt-get install libstdc++6:i386 libncurses5:i386 libz1:i386
  • Modify udev rules to detect your device.
cat <<EOF > /etc/udev/rules.d/51-android-nexus4.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
EOF
chmod a+r /etc/udev/rules.d/51-android-nexus4.rules
  • Android SDK
    • Download android sdk from google and install it some where in your home directory.
    • I did it with:
mkdir -p android/android-sdk
cd android-sdk
wget http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20130219.zip
unzip adt-bundle-linux-x86_64-20130219.zip
cd ..
  • Android NDK
    • This is only needed if you want to compile liblinphone.
    • Download android ndk from google and install it some where in your home directory.
    • I did it with:
mkdir android-ndk
cd android-ndk/
wget http://dl.google.com/android/ndk/android-ndk-r9-linux-x86_64.tar.bz2
tar -xjvf android-ndk-r9-linux-x86_64.tar.bz2
  • Start eclipse and add APIVERSION (e.g. 10, 11, the newest ).

  • Environment Variables

    • This is only needed if you want to compile liblinphone.
    • For me this works:
export ANDROID_NDK=/home/ben/dev/android/android-ndk/android-ndk-r9/
export ANDROID_SDK=/home/ben/dev/android/android-sdk/adt-bundle-linux-x86_64-20130514/sdk/
export PATH=$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$ANDROID_NDK
  • kde4 integration (start eclipse with ALT-F2)
    • Setting environment variables kde wide to let you start eclipse from the android sdk bundle via ALT+F2:
mkdir -p .kde/env
cat <<EOF > .kde/env/set-path.sh
#!/bin/sh
export ANDROID_NDK=/home/ben/dev/android/android-ndk/android-ndk-r9/
export ANDROID_SDK=/home/ben/dev/android/android-sdk/adt-bundle-linux-x86_64-20130514/sdk/
export ANDROID_SDK_ECLIPSE=/home/ben/dev/android/android-sdk/adt-bundle-linux-x86_64-20130514/eclipse/
export PATH=\$PATH:\$ANDROID_SDK/tools:\$ANDROID_SDK/platform-tools:\$ANDROID_NDK:\$ANDROID_SDK_ECLIPSE

export SIMLAR_KEYSTORE=/home/ben/dev/android/simlar-release-key.keystore

EOF
chmod +x .kde/env/set-path.sh
⚠️ **GitHub.com Fallback** ⚠️