簡體   English   中英

使用帶有Python和Kivy的buildozer時出現錯誤“無法找到編譯器”

[英]Error “Unable to find Compiler” using buildozer with Python and Kivy

我想將我的kivy應用程序編譯為android apk,但出現錯誤:

:~/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"

我已經在尋找此錯誤消息,但找不到該問題的任何解決方案。 有什么技巧如何解決這個問題? 我正在使用debian 32bit。

我知道這個問題有點老了,但是:

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

您必須使用ndk版本更改Y,並使用API​​ ID更改X。

您可以將其添加到〜/ .bashrc中。

它為我解決了問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM