#ubuntu #kivy #tensorflow-lite #buildozer
#ubuntu #kivy #tensorflow-lite #buildozer
Вопрос:
Я попытался запустить эту программу на github https://github.com/tito/experiment-tensorflow-lite В основном речь идет о запуске tensorflow lite с использованием kivy на Android.
Я попытался запустить программу на своем компьютере, но получил эту ошибку `
STDOUT:
patching file jnius/jnius_jvm_android.pxi
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file jnius/jnius_jvm_android.pxi.rej
patching file jnius/env.py
Hunk #1 FAILED at 185.
1 out of 1 hunk FAILED -- saving rejects to file jnius/env.py.rej
STDERR:
[INFO]: STDOUT:
patching file jnius/jnius_jvm_android.pxi
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file jnius/jnius_jvm_android.pxi.rej
patching file jnius/env.py
Hunk #1 FAILED at 185.
1 out of 1 hunk FAILED -- saving rejects to file jnius/env.py.rej
[INFO]: STDERR:
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/pls/experiment-tensorflow-lite/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1276, in <module>
main()
File "/home/pls/experiment-tensorflow-lite/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/home/pls/experiment-tensorflow-lite/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 725, in init
getattr(self, command)(args)
File "/home/pls/experiment-tensorflow-lite/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 153, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/home/pls/experiment-tensorflow-lite/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 212, in build_dist_from_args
build_recipes(build_order, python_modules, ctx,
File "/home/pls/experiment-tensorflow-lite/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 573, in build_recipes
recipe.apply_patches(arch)
File "/home/pls/experiment-tensorflow-lite/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 560, in apply_patches
self.apply_patch(
File "/home/pls/experiment-tensorflow-lite/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 263, in apply_patch
shprint(sh.patch, "-t", "-d", build_dir, "-p1",
File "/home/pls/experiment-tensorflow-lite/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint
for line in output:
File "/usr/local/lib/python3.8/dist-packages/sh-1.14.1-py3.8.egg/sh.py", line 911, in next
self.wait()
File "/usr/local/lib/python3.8/dist-packages/sh-1.14.1-py3.8.egg/sh.py", line 841, in wait
self.handle_command_exit_code(exit_code)
File "/usr/local/lib/python3.8/dist-packages/sh-1.14.1-py3.8.egg/sh.py", line 865, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /usr/bin/patch -t -d /home/pls/experiment-tensorflow-lite/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/pyjnius-sdl2/armeabi-v7a__ndk_target_21/pyjnius -p1 -i /home/pls/experiment-tensorflow-lite/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/pyjnius/sdl2_jnienv_getter.patch
STDOUT:
patching file jnius/jnius_jvm_android.pxi
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file jnius/jnius_jvm_android.pxi.rej
patching file jnius/env.py
Hunk #1 FAILED at 185.
1 out of 1 hunk FAILED -- saving rejects to file jnius/env.py.rej
Я использовал тот же файл buildozer.init на github
Версия Python: 3.8.10
Я запустил программу на виртуальной машине ubuntu, используя virtual box
Комментарии:
1. Не могли бы вы решить проблему? Я страдаю от tensorflow / tensorflow-lite при сборке apk.
Ответ №1:
Просто используйте command:
buildozer android clean
перед:
buildozer android debug