2014-05-09 89 views
0

我無法使用buildozer製作我簡單的kivy模塊APK。在Ubuntu上製作與Kivy和Buildozer的apk 12.04

以下是錯誤轉儲:

 
Entering in ARM enviromnent 
Compiler found at /home/roshan/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin//arm-linux-androideabi-gcc 
/home/roshan/AndroidApp/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires' 
    warnings.warn(msg) 
running build_ext 
building 'jnius' extension 
arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/roshan/.buildozer/android/platform/android-ndk-r9c/platforms/android-14/arch-arm -DNDEBUG -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/roshan/.buildozer/android/platform/android-ndk-r9c/platforms/android-14/arch-arm -fPIC -I/home/roshan/AndroidApp/.buildozer/android/platform/python-for-android/build/python-install/include/python2.7 -c jnius/jnius.c -o build/temp.linux-i686-2.7/jnius/jnius.o 
jnius/jnius.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation. 
#error Do not use this file, it is the result of a failed Cython compilation. 
^
error: command 'arm-linux-androideabi-gcc' failed with exit status 1 
Compiling /home/roshan/AndroidApp/.buildozer/android/platform/python-for-android/build/pyjnius/pyjnius-master/jnius/jnius.pyx 

Error compiling Cython file: 
------------------------------------------------------------ 
... 

cdef class ByteArray: 
    cdef LocalRef _jobject 
    cdef long _size 
    cdef jbyte *_buf 
    cdef jbyte[:] _arr 
      ^
------------------------------------------------------------ 

jnius/jnius_nativetypes.pxi:19:15: Expected an identifier or literal 
/home/roshan/AndroidApp/.buildozer/android/platform/python-for-android/build/python-install/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires' 
    warnings.warn(msg) 
running build_ext 
building 'jnius' extension 
arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/roshan/.buildozer/android/platform/android-ndk-r9c/platforms/android-14/arch-arm -DNDEBUG -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/roshan/.buildozer/android/platform/android-ndk-r9c/platforms/android-14/arch-arm -fPIC -I/home/roshan/AndroidApp/.buildozer/android/platform/python-for-android/build/python-install/include/python2.7 -c jnius/jnius.c -o build/temp.linux-i686-2.7/jnius/jnius.o 
jnius/jnius.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation. 
#error Do not use this file, it is the result of a failed Cython compilation. 
^
error: command 'arm-linux-androideabi-gcc' failed with exit status 1 
# Command failed: ./distribute.sh -m "kivy" -d "Playstring" 

如何解決它。我嘗試再次安裝cython,但沒有幫助。

+0

你是怎麼安裝用Cython? –

+0

第一次來自Ubuntu軟件中心,下次使用easy_install。 –

回答

2

看起來你的Cython太舊了。當我在12.04開始Kivy開發時,我遇到了類似的問題。嘗試從PPA安裝更新的版本或使用PIP。

從PPA:

sudo apt-add-repository ppa:cython-dev/master-ppa 
sudo apt-get update 
sudo apt-get install cython 

使用PIP:

sudo apt-get install python-pip 
sudo pip install --upgrade cython 
+0

謝謝瑞恩。它與升級一起工作。 –