启动python项目找不到路径_Buildozer编译失败:找不到应用程序项目目录?

1586010002-jmsa.png

I'm new to kivy and when i try to compile buildozer i am getting an error.

The first error was about downloading recipes. I downloaded the packages manually, also i defined their path in buildozer.spec file:

# (list) Application requirements

# comma seperated e.g. requirements = sqlite3,kivy

requirements = kivy,hostpython2,python2,six,pyjnius,kivy,sdl2_image

# (str) Custom source folders for requirements

# Sets custom source for any requirements with recipes

# requirements.source.kivy = ../../kivy

requirements.source.hostpython2 = ~/.buildozer/hostpython2

requirements.source.python2 = ~/.buildozer/python2

requirements.source.six = ~/.buildozer/six

requirements.source.pyjnius = ~/.buildozer/pyjnius

requirements.source.kivy = ~/.buildozer/kivy

requirements.source.sdl2_image = ~/.buildozer/sdl2_image

And then, i retried the compilation:

sudo buildozer -v android debug

However after a while i saw a different error:

STDOUT:

Android NDK: Could not find application project directory !

Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.

/home/tanberk/.buildozer/android/platform/android-ndk-r9c/build/core/build-local.mk:148: *** Android NDK: Aborting . Stop.

STDERR:

# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy,hostpython2,python2,six,pyjnius,kivy,sdl2_image --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/tanberk/İndirilenler/.buildozer/android/platform/build

#

# Buildozer failed to execute the last command

# The error might be hidden in the log above this error

# Please read the full log, and search for it before

# raising an issue with buildozer itself.

# In case of a bug report, please add a full log with log_level = 2

Can anyone help me to fix this problem?

Thanks in advance.

OS: Ubuntu 17.04

Python: 3.5.2

Edit 1:

@ikolim

I tried to follow the steps, now the error type is UnicodeError.

There's a Warning in the output.

[WARNING]: NDK version was set as r10.3.2, but checking the NDK dir claims it is 10.3.2, or should i download version **r8**?

[WARNING]: The build will try to continue, but it may fail and you should check that your setting is correct.

[WARNING]: If the NDK dir result is correct, you don't need to manually set the NDK ver.

What should i do, is there a r10.3.2 version which is different than 10.3.2? Or should i download version r8?

The whole output is below.

tanberk@kutlu:~/İndirilenler$ buildozer android debug deploy run

# Check configuration tokens

# Ensure build layout

# Check configuration tokens

# Preparing build

# Check requirements for android

# Run 'dpkg --version'

# Cwd None

Debian 'dpkg' paket yönetim programı sürüm 1.18.10 (amd64).

Bu bir özgür yazılımdır; kopyalama şartları için GNU Genel Kamu Lisansı

sürüm 2 ya da daha yenisine bakın. Hiçbir garanti verilmez.

# Search for Git (git)

# -> found at /usr/bin/git

# Search for Cython (cython)

# -> found at /usr/bin/cython

# Search for Java compiler (javac)

# -> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac

# Search for Java keytool (keytool)

# -> found at /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool

# Install platform

# Run 'pip install -q --user "appdirs" "colorama>=0.3.3" "sh>=1.10,<1.12.5" "jinja2" "six"'

# Cwd None

# Apache ANT found at /home/tanberk/.buildozer/android/platform/apache-ant-1.9.4

# Android SDK found at /home/tanberk/.buildozer/android/platform/android-sdk-20

# Android NDK found at /opt/crystax-ndk-10.3.2

# Check application requirements

# Check garden requirements

# Compile platform

# Run '/usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3crystax,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/tanberk/\xc4\xb0ndirilenler/.buildozer/android/platform/build'

# Cwd /home/tanberk/İndirilenler/.buildozer/android/platform/python-for-android-master

[INFO]: Will compile for the following archs: armeabi-v7a

[INFO]: Found Android API target in $ANDROIDAPI

[INFO]: Available Android APIs are (19)

[INFO]: Requested API target 19 is available, continuing.

[INFO]: Found NDK dir in $ANDROIDNDK

[INFO]: Got NDK version from $ANDROIDNDKVER

[WARNING]: NDK version was set as r10.3.2, but checking the NDK dir claims it is 10.3.2.

[WARNING]: The build will try to continue, but it may fail and you should check that your setting is correct.

[WARNING]: If the NDK dir result is correct, you don't need to manually set the NDK ver.

[INFO]: Using Crystax NDK r10.3.2

[INFO]: Found virtualenv at /usr/local/bin/virtualenv

[INFO]: Found the following toolchain versions: ['4.9', '5', 'clang3.6', 'clang3.7']

[INFO]: Picking the latest gcc toolchain, here 5

[INFO]: No existing dists meet the given requirements!

[INFO]: No dist exists that meets your requirements, so one will be built.

Traceback (most recent call last):

File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main

"__main__", fname, loader, pkg_name)

File "/usr/lib/python2.7/runpy.py", line 72, in _run_code

exec code in run_globals

File "/home/tanberk/İndirilenler/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 916, in

main()

File "/home/tanberk/İndirilenler/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 913, in main

ToolchainCL()

File "/home/tanberk/İndirilenler/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 514, in __init__

getattr(self, args.subparser_name.replace('-', '_'))(args)

File "/home/tanberk/İndirilenler/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 147, in wrapper_func

build_dist_from_args(ctx, dist, args)

File "/home/tanberk/İndirilenler/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 169, in build_dist_from_args

= get_recipe_order_and_bootstrap(ctx, dist.recipes, bs)

File "pythonforandroid/graph.py", line 113, in get_recipe_order_and_bootstrap

name, ctx, orders=new_possible_orders)

File "pythonforandroid/graph.py", line 36, in recursively_collect_orders

recipe = Recipe.get_recipe(name, ctx)

File "pythonforandroid/recipe.py", line 629, in get_recipe

recipe_file = join(recipes_dir, name, '__init__.py')

File "/usr/lib/python2.7/posixpath.py", line 73, in join

path += '/' + b

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 14: ordinal not in range(128)

# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3crystax,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/tanberk/İndirilenler/.buildozer/android/platform/build

#

# Buildozer failed to execute the last command

# The error might be hidden in the log above this error

# Please read the full log, and search for it before

# raising an issue with buildozer itself.

# In case of a bug report, please add a full log with log_level = 2

tanberk@kutlu:~/İndirilenler$

And when i look at the #Command Failed: i suspect that the program runs with python2 instead of python3?

Edit 2:

I changed the directory but it gave an error again.

Below is the new error message.

tanberk@kutlu:~/Android$ buildozer android debug deploy run

# Check configuration tokens

# Ensure build layout

# Check configuration tokens

# Preparing build

# Check requirements for android

# Run 'dpkg --version'

# Cwd None

Debian 'dpkg' paket yönetim programı sürüm 1.18.10 (amd64).

Bu bir özgür yazılımdır; kopyalama şartları için GNU Genel Kamu Lisansı

sürüm 2 ya da daha yenisine bakın. Hiçbir garanti verilmez.

# Search for Git (git)

# -> found at /usr/bin/git

# Search for Cython (cython)

# -> found at /usr/bin/cython

# Search for Java compiler (javac)

# -> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac

# Search for Java keytool (keytool)

# -> found at /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool

# Install platform

# Run 'pip install -q --user "appdirs" "colorama>=0.3.3" "sh>=1.10,<1.12.5" "jinja2" "six"'

# Cwd None

# Apache ANT found at /home/tanberk/.buildozer/android/platform/apache-ant-1.9.4

# Android SDK found at /home/tanberk/.buildozer/android/platform/android-sdk-20

# Android NDK found at /opt/crystax-ndk-10.3.2

# Check application requirements

# Check garden requirements

# Compile platform

# Run '/usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=hostpython3crystax,python3crystax,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/tanberk/Android/.buildozer/android/platform/build'

# Cwd /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: Will compile for the following archs: armeabi-v7a

[INFO]: Found Android API target in $ANDROIDAPI

[INFO]: Available Android APIs are (19)

[INFO]: Requested API target 19 is available, continuing.

[INFO]: Found NDK dir in $ANDROIDNDK

[INFO]: Got NDK version from $ANDROIDNDKVER

[WARNING]: NDK version was set as r10.3.2, but checking the NDK dir claims it is 10.3.2.

[WARNING]: The build will try to continue, but it may fail and you should check that your setting is correct.

[WARNING]: If the NDK dir result is correct, you don't need to manually set the NDK ver.

[INFO]: Using Crystax NDK r10.3.2

[INFO]: Found virtualenv at /usr/local/bin/virtualenv

[INFO]: Found the following toolchain versions: ['4.9', '5', 'clang3.6', 'clang3.7']

[INFO]: Picking the latest gcc toolchain, here 5

[INFO]: No existing dists meet the given requirements!

[INFO]: No dist exists that meets your requirements, so one will be built.

[INFO]: Found a single valid recipe set: [u'hostpython3crystax', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', u'python3crystax', 'sdl2', 'six', 'pyjnius', u'kivy']

[INFO]: The selected bootstrap is sdl2

[INFO]: # Creating dist with sdl2 bootstrap

[INFO]: Dist will have name myapp and recipes (hostpython3crystax, python3crystax, kivy)

[INFO]: Dist will also contain modules () installed from pip

[INFO]: -> running cp -r /home/tanberk/Android/.b...(and 189 more)

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3crystax

[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: Recipe build order is [u'hostpython3crystax', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', u'python3crystax', 'sdl2', 'six', 'pyjnius', u'kivy']

[INFO]: # Downloading recipes

[INFO]: Downloading hostpython3crystax

[INFO]: Skipping hostpython3crystax download as no URL is set

[INFO]: Downloading sdl2_image

[INFO]: -> running mkdir -p /home/tanberk/Android...(and 54 more)

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/packages/sdl2_image

[INFO]: -> running basename https://www.libsdl.or...(and 52 more)

[INFO]: sdl2_image download already cached, skipping

[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: Downloading sdl2_mixer

[INFO]: -> running mkdir -p /home/tanberk/Android...(and 54 more)

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/packages/sdl2_mixer

[INFO]: -> running basename https://www.libsdl.or...(and 52 more)

[INFO]: sdl2_mixer download already cached, skipping

[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: Downloading sdl2_ttf

[INFO]: -> running mkdir -p /home/tanberk/Android...(and 52 more)

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/packages/sdl2_ttf

[INFO]: -> running basename https://www.libsdl.org...(and 48 more)

[INFO]: sdl2_ttf download already cached, skipping

[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: Downloading python3crystax

[INFO]: -> running mkdir -p /home/tanberk/Android...(and 58 more)

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/packages/python3crystax

[INFO]: -> running basename

[INFO]: -> running rm -f .mark-

[INFO]: -> running touch .mark-

[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: Downloading sdl2

[INFO]: -> running mkdir -p /home/tanberk/Android/...(and 47 more)

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/packages/sdl2

[INFO]: -> running basename https://www.libsdl.org...(and 26 more)

[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: Downloading six

[INFO]: -> running mkdir -p /home/tanberk/Android/...(and 46 more)

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/packages/six

[INFO]: -> running basename https://pypi.python.or...(and 40 more)

[INFO]: six download already cached, skipping

[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: Downloading pyjnius

[INFO]: -> running mkdir -p /home/tanberk/Android...(and 51 more)

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/packages/pyjnius

[INFO]: -> running basename https://github.com/kiv...(and 28 more)

[INFO]: pyjnius download already cached, skipping

[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: Downloading kivy

[INFO]: -> running mkdir -p /home/tanberk/Android/...(and 47 more)

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/packages/kivy

[INFO]: -> running basename https://github.com/kiv...(and 25 more)

[INFO]: kivy download already cached, skipping

[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: # Building all recipes for arch armeabi-v7a

[INFO]: # Unpacking recipes

[INFO]: Unpacking hostpython3crystax for armeabi-v7a

[INFO]: Skipping hostpython3crystax unpack as no URL is set

[INFO]: Unpacking sdl2_image for armeabi-v7a

[INFO]: -> running basename https://www.libsdl.or...(and 52 more)

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3crystax/jni

[INFO]: sdl2_image is already unpacked, skipping

[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: Unpacking sdl2_mixer for armeabi-v7a

[INFO]: -> running basename https://www.libsdl.or...(and 52 more)

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3crystax/jni

[INFO]: sdl2_mixer is already unpacked, skipping

[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: Unpacking sdl2_ttf for armeabi-v7a

[INFO]: -> running basename https://www.libsdl.org...(and 48 more)

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3crystax/jni

[INFO]: sdl2_ttf is already unpacked, skipping

[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: Unpacking python3crystax for armeabi-v7a

[INFO]: -> running basename

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/build/other_builds/python3crystax-version3.5/armeabi-v7a

[INFO]: python3crystax is already unpacked, skipping

[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: Unpacking sdl2 for armeabi-v7a

[INFO]: -> running basename https://www.libsdl.org...(and 26 more)

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3crystax/jni

[INFO]: sdl2 is already unpacked, skipping

[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: Unpacking six for armeabi-v7a

[INFO]: -> running basename https://pypi.python.or...(and 40 more)

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/build/other_builds/six-python3crystax/armeabi-v7a

[INFO]: six is already unpacked, skipping

[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: Unpacking pyjnius for armeabi-v7a

[INFO]: -> running basename https://github.com/kiv...(and 28 more)

work[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/build/other_builds/pyjnius-python3crystax-sdl2/armeabi-v7a

[INFO]: pyjnius is already unpacked, skipping

[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: Unpacking kivy for armeabi-v7a

[INFO]: -> running basename https://github.com/kiv...(and 25 more)

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/build/other_builds/kivy-python3crystax-sdl2/armeabi-v7a

[INFO]: kivy is already unpacked, skipping

[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: # Prebuilding recipes

[INFO]: Prebuilding hostpython3crystax for armeabi-v7a

[INFO]: hostpython3crystax has no prebuild_armeabi_v7a, skipping

[INFO]: Prebuilding sdl2_image for armeabi-v7a

[INFO]: sdl2_image has no prebuild_armeabi_v7a, skipping

[INFO]: Applying patches for sdl2_image[armeabi-v7a]

[INFO]: sdl2_image already patched, skipping

[INFO]: Prebuilding sdl2_mixer for armeabi-v7a

[INFO]: sdl2_mixer has no prebuild_armeabi_v7a, skipping

[INFO]: Applying patches for sdl2_mixer[armeabi-v7a]

[INFO]: sdl2_mixer already patched, skipping

[INFO]: Prebuilding sdl2_ttf for armeabi-v7a

[INFO]: sdl2_ttf has no prebuild_armeabi_v7a, skipping

[INFO]: Prebuilding python3crystax for armeabi-v7a

[INFO]: python3crystax has no prebuild_armeabi_v7a, skipping

[INFO]: Prebuilding sdl2 for armeabi-v7a

[INFO]: sdl2 has no prebuild_armeabi_v7a, skipping

[INFO]: Applying patches for sdl2[armeabi-v7a]

[INFO]: sdl2 already patched, skipping

[INFO]: Prebuilding six for armeabi-v7a

[INFO]: six has no prebuild_armeabi_v7a, skipping

[INFO]: Prebuilding pyjnius for armeabi-v7a

[INFO]: pyjnius has no prebuild_armeabi_v7a, skipping

[INFO]: Applying patches for pyjnius[armeabi-v7a]

[INFO]: pyjnius already patched, skipping

[INFO]: Prebuilding kivy for armeabi-v7a

[INFO]: kivy has no prebuild_armeabi_v7a, skipping

[INFO]: # Building recipes

[INFO]: Building hostpython3crystax for armeabi-v7a

[INFO]: Building sdl2_image for armeabi-v7a

[INFO]: Building sdl2_mixer for armeabi-v7a

[INFO]: Building sdl2_ttf for armeabi-v7a

[INFO]: Building python3crystax for armeabi-v7a

[INFO]: Building sdl2 for armeabi-v7a

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3crystax/jni

[INFO]: -> running ndk-build V=1

working: /opt/crystax-ndk-10.3.2/t[INFO]: <- directory context /home/tanberk/Android/.buildozer/android/platform/python-for-android-master

[INFO]: Building six for armeabi-v7a

[INFO]: six apparently isn't already in site-packages

[INFO]: Installing six into site-packages

[INFO]: -> directory context /home/tanberk/Android/.buildozer/android/platform/build/build/other_builds/six-python3crystax/armeabi-v7a/six

[INFO]: -> running python3.5 setup.py install -O2...(and 107 more)

working: addsitedir(sitedir, known_paths) Exception in thread background thread for pid 11620:

Traceback (most recent call last):

File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner

self.run()

File "/usr/lib/python2.7/threading.py", line 754, in run

self.__target(*self.__args, **self.__kwargs)

File "/home/tanberk/.local/lib/python2.7/site-packages/sh.py", line 2170, in background_thread

handle_exit_code(exit_code)

File "/home/tanberk/.local/lib/python2.7/site-packages/sh.py", line 1929, in fn

return self.command.handle_command_exit_code(exit_code)

File "/home/tanberk/.local/lib/python2.7/site-packages/sh.py", line 672, in handle_command_exit_code

raise exc

ErrorReturnCode_1:

RAN: /usr/bin/python3.5 setup.py install -O2 --root=/home/tanberk/Android/.buildozer/android/platform/build/build/python-installs/myapp --install-lib=.

STDOUT:

Failed to import the site module

Traceback (most recent call last):

File "/usr/lib/python3.5/site.py", line 580, in

main()

File "/usr/lib/python3.5/site.py", line 567, in main

known_paths = addsitepackages(known_paths)

File "/usr/lib/python3.5/site.py", line 344, in addsitepackages

addsitedir(sitedir, known_paths)

File "/usr/lib/python3.5/site.py", line 212, in addsitedir

addpackage(sitedir, name, known_paths)

File "/usr/lib/python3.5/site.py", line 168, in addpackage

for n, line in enumerate(f):

File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode

return codecs.ascii_decode(input, self.errors)[0]

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 14: ordinal not in range(128)

STDERR:

Traceback (most recent call last):

File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main

"__main__", fname, loader, pkg_name)

File "/usr/lib/python2.7/runpy.py", line 72, in _run_code

exec code in run_globals

File "/home/tanberk/Android/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 916, in

main()

File "/home/tanberk/Android/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 913, in main

ToolchainCL()

File "/home/tanberk/Android/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 514, in __init__

getattr(self, args.subparser_name.replace('-', '_'))(args)

File "/home/tanberk/Android/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 147, in wrapper_func

build_dist_from_args(ctx, dist, args)

File "/home/tanberk/Android/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 192, in build_dist_from_args

build_recipes(build_order, python_modules, ctx)

File "pythonforandroid/build.py", line 572, in build_recipes

File "pythonforandroid/recipe.py", line 806, in build_arch

File "pythonforandroid/recipe.py", line 839, in install_python_package

File "pythonforandroid/logger.py", line 175, in shprint

File "/home/tanberk/.local/lib/python2.7/site-packages/sh.py", line 720, in next

self.wait()

File "/home/tanberk/.local/lib/python2.7/site-packages/sh.py", line 651, in wait

self.handle_command_exit_code(exit_code)

File "/home/tanberk/.local/lib/python2.7/site-packages/sh.py", line 672, in handle_command_exit_code

raise exc

sh.ErrorReturnCode_1:

RAN: /usr/bin/python3.5 setup.py install -O2 --root=/home/tanberk/Android/.buildozer/android/platform/build/build/python-installs/myapp --install-lib=.

STDOUT:

Failed to import the site module

Traceback (most recent call last):

File "/usr/lib/python3.5/site.py", line 580, in

main()

File "/usr/lib/python3.5/site.py", line 567, in main

known_paths = addsitepackages(known_paths)

File "/usr/lib/python3.5/site.py", line 344, in addsitepackages

addsitedir(sitedir, known_paths)

File "/usr/lib/python3.5/site.py", line 212, in addsitedir

addpackage(sitedir, name, known_paths)

File "/usr/lib/python3.5/site.py", line 168, in addpackage

for n, line in enumerate(f):

File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode

return codecs.ascii_decode(input, self.errors)[0]

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 14: ordinal not in range(128)

STDERR:

# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=hostpython3crystax,python3crystax,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/tanberk/Android/.buildozer/android/platform/build

#

# Buildozer failed to execute the last command

# The error might be hidden in the log above this error

# Please read the full log, and search for it before

# raising an issue with buildozer itself.

# In case of a bug report, please add a full log with log_level = 2

tanberk@kutlu:~/Android$

解决方案

I am able to run buildozer successfully. I am using Ubuntu 16.04 LTS, Kivy 1.10.0, and Python 3.5. I did the following:

Installing Buildozer with python3 support:

Install buildozer from source:

git clone https://github.com/kivy/buildozer

cd buildozer

python setup.py build

sudo pip install -e .

Download and extract the Crystax NDK somewhere (/opt/crystax-ndk is one option): https://www.crystax.net/en/download

Install Cython (pip 9.0.1 from /usr/local/lib/python3.5/dist-packages)

sudo pip install --upgrade cython==0.26

Go into your application directory and create buildozer.spec file by executing:

buildozer init

Edit the buildozer.spec file and make sure the following lines are in:

# Require python3crystax:

requirements = hostpython3,python3crystax,kivy

...

# Kivy version to use

osx.kivy_version = 1.10.0

...

# (str) Android NDK version to use

android.ndk = 10.3.2

...

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

android.ndk_path = /opt/crystax-ndk-10.3.2

Finally, build, deploy and run the app on your phone:

buildozer android debug deploy run

If it failed the first time, execute the following:

buildozer android clean debug deploy run

Note

Please try buildozer against a hello world app (Kivy Basics - minimal application).

Output

sDphi.png

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这个错误提示"DLL load failed while importing _86_C: 不到指定的程序"通常表示在导入某个模块时,Python不到相应的程序文件。这个错误可能是由于以下几个原因导致的: 1. 缺少相应的依赖库:这个错误可能是由于缺少所需的依赖库或安装了不兼容的依赖库所致。请确保已正确安装了所需的依赖库,并且版本与Python环境兼容。 2. 模块损坏或不存在:这个错误还可能是由于导入的模块本身损坏或不存在导致的。请确保导入的模块存在并正确安装。 3. 环境配置问题:这个错误也可能是由于环境配置问题导致的。请确保Python环境和相关工具的配置正确,并且路径设置正确。 为了更好地解决这个问题,您可以尝试以下几个步骤: 1. 确认依赖库和模块是否正确安装,并且版本兼容。可以使用命令`pip list`来查看已安装的模块列表,并检查所需的模块是否存在。 2. 检查模块的路径设置是否正确。您可以尝试在Python代码中添加以下代码来查看Python的模块搜索路径: ```python import sys print(sys.path) ``` 确认模块所在的路径是否在搜索路径中。 3. 如果您使用的是Visual Studio Code作为集成开发环境,请确保您的Python解释器已正确配置。可以通过单击底部的Python版本号来选择正确的解释器。 4. 如果问题仍然存在,您可以尝试卸载并重新安装相关的依赖库和模块。 希望以上信息能够帮助您解决问题。如有其他疑问,请随时提问。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值