2014-04-12 101 views
0

我試圖用Kivy和Buildozer構建一個APK,當我運行「buildozer android debug」時,我收到了這個錯誤作爲響應:Kivy Buildozer無法構建apk,命令失敗:./distribute.sh -m「kivy」d

a 
./distribute.sh: line 371: test: too many arguments 
./distribute.sh: line 372: test: too many arguments 
./distribute.sh: line 373: test: too many arguments 
./distribute.sh: line 374: test: too many arguments 
./distribute.sh: line 377: $SRC_PATH/default.properties: ambiguous redirect 
./distribute.sh: line 378: $SRC_PATH/local.properties: ambiguous redirect 
cp: cannot create regular file ‘x/.buildozer/android/platform/python-for-android/.git/objects/pack/pack-b89e3f872ff0b0fbbaa9c0f1182451f8506241dc.idx’: Permission denied 
cp: cannot create regular file ‘x/.buildozer/android/platform/python-for-android/.git/objects/pack/pack-b89e3f872ff0b0fbbaa9c0f1182451f8506241dc.pack’: Permission denied 
cp: cannot copy a directory, ‘/home/tom/Dropbox/Work’, into itself, ‘Test/.buildozer/android/platform/python-for-android/build/Work’ 
cp: will not create hard link x’ to directory ‘y’ 
cp: will not create hard link ‘x’ to directory ‘y’ 
cp: will not create hard link ‘x’ to directory ‘y’ 
cp: will not create hard link ‘x’ to directory ‘y’ 
cp: will not create hard link ‘x’ to directory ‘y’ 
cp: cannot stat ‘Test/.buildozer/android/platform/python-for-android/src/blacklist.txt’: No such file or directory 
cp: will not create hard link ‘x’ to directory ‘y’ 
cp: will not create hard link ‘x’ to directory ‘y’ 
cp: will not create hard link ‘x’ to directory ‘y’ 
cp: will not create hard link ‘x’ to directory ‘y’ 
cp: will not create hard link ‘x’ to directory ‘y’ 
cp: will not create hard link ‘x’ to directory ‘y’ 
# Command failed: ./distribute.sh -m "kivy" -d "pongtest" 

現在看來似乎正在經歷一個奇怪的重定向,但它不幸的是返回一個非特定錯誤信息,因此,如果任何人有可能是什麼什麼想法,他們會不勝感激。謝謝!

這裏的bulldozer.spec:

# (str) Title of your application 
title = Pong Test 

# (str) Package name 
package.name = pongtest 

# (str) Package domain (needed for android/ios packaging) 
package.domain = org.test 

# (str) Source code where the main.py live 
source.dir = . 

# (list) Source files to include (let empty to include all the files) 
source.include_exts = py,png,jpg,kv,atlas 

# (list) Source files to exclude (let empty to not exclude anything) 
#source.exclude_exts = spec 

# (list) List of directory to exclude (let empty to not exclude anything) 
#source.exclude_dirs = tests, bin 

# (list) List of exclusions using pattern matching 
#source.exclude_patterns = license,images/*/*.jpg 

# (str) Application versioning (method 1) 
version.regex = __version__ = '(.*)' 
version.filename = %(source.dir)s/main.py 

# (str) Application versioning (method 2) 
# version = 1.2.0 

# (list) Application requirements 
requirements = kivy 

# (list) Garden requirements 
#garden_requirements = 

# (str) Presplash of the application 
#presplash.filename = %(source.dir)s/data/presplash.png 

# (str) Icon of the application 
#icon.filename = %(source.dir)s/data/icon.png 

# (str) Supported orientation (one of landscape, portrait or all) 
orientation = landscape 

# (bool) Indicate if the application should be fullscreen or not 
fullscreen = 1 


# 
# Android specific 
# 

# (list) Permissions 
#android.permissions = INTERNET 

# (int) Android API to use 
#android.api = 14 

# (int) Minimum API required (8 = Android 2.2 devices) 
#android.minapi = 8 

# (int) Android SDK version to use 
#android.sdk = 21 

# (str) Android NDK version to use 
#android.ndk = 9c 

# (bool) Use --private data storage (True) or --dir public storage (False) 
#android.private_storage = True 

# (str) Android NDK directory (if empty, it will be automatically downloaded.) 
#android.ndk_path = 

# (str) Android SDK directory (if empty, it will be automatically downloaded.) 
#android.sdk_path = 

# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github) 
#android.p4a_dir = 

# (str) Android entry point, default is ok for Kivy-based app 
#android.entrypoint = org.renpy.android.PythonActivity 

# (list) List of Java .jar files to add to the libs so that pyjnius can access 
# their classes. Don't add jars that you do not need, since extra jars can slow 
# down the build process. Allows wildcards matching, for example: 
# OUYA-ODK/libs/*.jar 
#android.add_jars = foo.jar,bar.jar,path/to/more/*.jar 

# (list) List of Java files to add to the android project (can be java or a 
# directory containing the files) 
#android.add_src = 

# (str) python-for-android branch to use, if not master, useful to try 
# not yet merged features. 
#android.branch = master 

# (str) OUYA Console category. Should be one of GAME or APP 
# If you leave this blank, OUYA support will not be enabled 
#android.ouya.category = GAME 

# (str) Filename of OUYA Console icon. It must be a 732x412 png image. 
#android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png 

# (str) XML file to include as an intent filters in <activity> tag 
#android.manifest.intent_filters = 

# (list) Android additionnal libraries to copy into libs/armeabi 
#android.add_libs_armeabi = libs/android/*.so 

# (bool) Indicate whether the screen should stay on 
# Don't forget to add the WAKE_LOCK permission if you set this to True 
#android.wakelock = False 

# (list) Android application meta-data to set (key=value format) 
#android.meta_data = 

# (list) Android library project to add (will be added in the 
# project.properties automatically.) 
#android.library_references = 
[buildozer] 

# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output)) 
log_level = 2 
+0

這是你已經使用buildozer第一次,或者它已經在過去的工作?假設前者,你可以發佈你的buildozer.spec? – inclement

+0

您應該編輯原始文章以包含buildozer.spec,而不是將人員發送到粗略文件上傳網站。 – brousch

+0

@brousch是的,對不起,我把它添加到原來的帖子。 – user3527609

回答

0

我對Kubuntu的類似問題,導致錯誤:

# Command failed: ./distribute.sh -m "kivy" -d "kivyapptest" 

我是建立在Kubuntu的客戶端虛擬機,但我的文件被在我的主機的共享文件夾(我的Macbook Pro)上。

複製buildozer.specmain.py在我的Kubuntu的主文件夾的文件夾,並重建(含sudo權限ofcourse)後,我終於結束了我的.apk文件。

+1

不要用sudo運行buildozer。決不。 –

0

將文件移動到您的主文件夾(部署的軟件包將存儲在此處)。這很奇怪,但它對我有用 - 我將main.py和spec移到了創建部署的Macintosh HD上。

1

有權限問題!當我chmod 777孔源目錄事情工作(我不推薦作爲一個修復,雖然:))

0

我剛剛有這個錯誤,並指出,這是由於有一個空間和括號中的名義我的父目錄:

作品:「example_copy」 行不通的:「例如(副本)」

相關問題