knusperwurst
knusperwurst

Reputation: 155

Error "Unable to find Compiler" using buildozer with Python and Kivy

i want to compile my kivy app into an android apk but get an Error:

:~/kivyapps$ buildozer android debug
# Check configuration tokens   
# Ensure build layout
# Create directory .buildozer
# Create directory bin
# Create directory /home/stefan/kivyapps/.buildozer/applibs
# Create directory .buildozer/android/platform
# Create directory .buildozer/android/app
# Check configuration tokens
# Read available permissions from api-versions.xml
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
 # Cwd None
Debian »dpkg« Paketmanagement-Programm Version 1.16.12 (i386).
Dies ist freie Software; lesen Sie die GNU General Public License in der
Version 2 oder höher für Kopierbedingungen. Es wird KEINE Haftung übernommen.
# Search for Git git
#  -> found at /usr/bin/git
# Search for Cython cython
#  -> found at /usr/local/bin/cython
# Search for Java compiler
#  -> found at /usr/lib/jvm/java-7-openjdk-i386/bin/javac
# Search for Java keytool
#  -> found at /usr/lib/jvm/java-7-openjdk-i386/jre/bin/keytool
# Install platform
# Run 'git clone git://github.com/kivy/python-for-android'
# Cwd /home/stefan/kivyapps/.buildozer/android/platform
Cloning into 'python-for-android'...
# Apache ANT found at /home/stefan/.buildozer/android/platform/apache-ant-1.8.4
# Android SDK found at /home/stefan/.buildozer/android/platform/android-sdk-21
# Android NDK found at /home/stefan/.buildozer/android/platform/android-ndk-r9c
# Android packages already installed.
# Check application requirements
# Run './distribute.sh -l'
# Cwd /home/stefan/kivyapps/.buildozer/android/platform/python-for-android
Available modules: android audiostream c_igraph cymunk django docutils ffmpeg gevent greenlet hostpython igraph jpeg kivy libevent libxml2 libxslt lxml msgpack mysql_connector numpy openssl paramiko pil plyer png pyasn1 pycrypto pygame pyjnius pylibpd pyopenssl   pyparsing pyqrcode python sdl setuptools sqlalchemy sqlite3 twisted txws wokkel zope
# Remove directory and subdirectory /home/stefan/kivyapps/.buildozer/applibs
# Create directory /home/stefan/kivyapps/.buildozer/applibs
# Compile platform
# Run './distribute.sh -l'
# Cwd /home/stefan/kivyapps/.buildozer/android/platform/python-for-android
Available modules: android audiostream c_igraph cymunk django docutils ffmpeg gevent   greenlet hostpython igraph jpeg kivy libevent libxml2 libxslt lxml msgpack mysql_connector   numpy openssl paramiko pil plyer png pyasn1 pycrypto pygame pyjnius pylibpd pyopenssl      pyparsing pyqrcode python sdl setuptools sqlalchemy sqlite3 twisted txws wokkel zope
# Clean and build python-for-android
# Run './distribute.sh -m "kivy" -d "test"'
# Cwd /home/stefan/kivyapps/.buildozer/android/platform/python-for-android
Check build dependencies for Debian
Check enviromnent
SDK located at /home/stefan/.buildozer/android/platform/android-sdk-21
NDK located at /home/stefan/.buildozer/android/platform/android-ndk-r9c
NDK version is r9c
API level set to 14
Check mandatory tools
Distribution will be located at /home/stefan/kivyapps/.buildozer/android/platform/python-     for-android/dist/test
Entering in ARM enviromnent
Unable to find compiler (arm-linux-androideabi-gcc) !!
1. Ensure that SDK/NDK paths are correct
2. Ensure that you've the Android API 14 SDK Platform (via android tool)
# Command failed: ./distribute.sh -m "kivy" -d "test"

I already looked for this error message but could´t find any solution for this problem. Any tips how to solve this problem? Im using debian 32bit.

Upvotes: 1

Views: 1587

Answers (1)

Krozark
Krozark

Reputation: 860

I know that the question is a bit old, but:

export ANDROIDSDK="/path/to/android-sdk-linux"
export ANDROIDNDK="/path/to/android-ndk-rY" #change Y here
export ANDROIDNDKVER=rY #same here
export ANDROIDAPI=X #change X here
export PATH=$PATH:$ANDROIDNDK:$ANDROIDSDK/platform-tools:$ANDROIDSDK/tools

You have to change Y with the ndk version, and X with the API id.

You can add this to your ~/.bashrc.

It solve the problem for me.

Upvotes: 1

Related Questions