飞飞鱼963 2023-07-14 14:50 采纳率: 0%
浏览 28
已结题

关于buildozer打包的问题,如何解决?(语言-python|操作系统-linux)pyjnius,成功解决有酬谢。

使用buildozer 打包kivy(安卓apk)遇到的问题


```python
[INFO]:    **Building pyjnius for arm64-v8a**

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

[INFO]:    Cythonizing anything necessary in pyjnius

[INFO]:    -> directory context /home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/pyjnius-sdl2/arm64-v8a__ndk_target_21/pyjnius

[DEBUG]:   -> running python3 -c import sys; print(sys.path)

[DEBUG]:       ['', '/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib', '/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages', '/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/scripts-3.10', '/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/lib.linux-x86_64-3.10', '/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/temp.linux-x86_64-3.10', '/usr/local/lib/python310.zip', '/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Lib']

[DEBUG]:   cwd is /home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/pyjnius-sdl2/arm64-v8a__ndk_target_21/pyjnius

[INFO]:    Trying first build of pyjnius to get cython files: this is expected to fail

[DEBUG]:   -> running python3 setup.py build_ext -v

[DEBUG]:       warning: [options] bootstrap class path not set in conjunction with -source 7

[DEBUG]:       warning: [options] source value 7 is obsolete and will be removed in a future release

[DEBUG]:       warning: [options] target value 7 is obsolete and will be removed in a future release

[DEBUG]:       warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.

[DEBUG]:       4 warnings

[DEBUG]:       running build_ext

[DEBUG]:       building 'jnius' extension

[DEBUG]:       /home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include -DANDROID -I/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/include/python3.1 -fPIC -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c jnius/jnius.c -o build/temp.linux-x86_64-3.10/jnius/jnius.o

[DEBUG]:       jnius/jnius.c:12406:19: warning: assigning to 'jchar *' (aka 'unsigned short *') from 'const jchar *' (aka 'const unsigned short *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]

[DEBUG]:         __pyx_v_j_chars = (__pyx_v_j_env[0])->GetStringChars(__pyx_v_j_env, __pyx_v_j_string, NULL);

[DEBUG]:                         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:54433:5: error: expression is not assignable

[DEBUG]:           ++Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:54435:5: error: expression is not assignable

[DEBUG]:           --Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:54549:5: error: expression is not assignable

[DEBUG]:           ++Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:54551:5: error: expression is not assignable

[DEBUG]:           --Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:54803:5: error: expression is not assignable

[DEBUG]:           ++Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:54805:5: error: expression is not assignable

[DEBUG]:           --Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:55697:5: error: expression is not assignable

[DEBUG]:           ++Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:55699:5: error: expression is not assignable

[DEBUG]:           --Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:56008:5: error: expression is not assignable

[DEBUG]:           ++Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:56010:5: error: expression is not assignable

[DEBUG]:           --Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:56258:5: error: expression is not assignable

[DEBUG]:           ++Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:56260:5: error: expression is not assignable

[DEBUG]:           --Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:59573:16: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]

[DEBUG]:               return PyUnicode_FromUnicode(NULL, 0);

[DEBUG]:                      ^

[DEBUG]:       /home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here

[DEBUG]:       Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(

[DEBUG]:       ^

[DEBUG]:       /home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'

[DEBUG]:       #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))

[DEBUG]:                                                            ^

[DEBUG]:       jnius/jnius.c:60809:16: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]

[DEBUG]:               return PyUnicode_FromUnicode(NULL, 0);

[DEBUG]:                      ^

[DEBUG]:       /home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here

[DEBUG]:       Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(

[DEBUG]:       ^

[DEBUG]:       /home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'

[DEBUG]:       #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))

[DEBUG]:                                                            ^

[DEBUG]:       3 warnings and 12 errors generated.

[DEBUG]:       error: command '/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang' failed with exit code 1

Exception in thread background thread for pid 2937:

Traceback (most recent call last):

  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner

    self.run()

  File "/usr/lib/python3.10/threading.py", line 953, in run

    self._target(*self._args, **self._kwargs)

  File "/home/kivy/.local/lib/python3.10/site-packages/sh.py", line 1641, in wrap

    fn(*rgs, **kwargs)

  File "/home/kivy/.local/lib/python3.10/site-packages/sh.py", line 2569, in background_thread

    handle_exit_code(exit_code)

  File "/home/kivy/.local/lib/python3.10/site-packages/sh.py", line 2269, in fn

    return self.command.handle_command_exit_code(exit_code)

  File "/home/kivy/.local/lib/python3.10/site-packages/sh.py", line 869, in handle_command_exit_code

    raise exc

sh.ErrorReturnCode_1: 



  RAN: '/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3' setup.py build_ext -v



  STDOUT:

warning: [options] bootstrap class path not set in conjunction with -source 7

warning: [options] source value 7 is obsolete and will be removed in a future release

warning: [options] target value 7 is obsolete and will be removed in a future release

warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.

4 warnings

running build_ext

building 'jnius' extension

/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include -DANDROID -I/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/include/python3.1 -fPIC -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c jnius/jnius.c -o build/temp.linux-x86_64-3.10/jnius/jnius.o

jnius/jnius.c:12406:19: warning: assigning to 'jchar *' (aka 'unsigned short *') from 'const jchar *' (aka 'const unsigned short *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]

  __pyx_v_j_chars = (__pyx_v_j_env[0])->GetStringChars(__pyx_v_j_env, __pyx_v_j_string, NULL);

                  ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

jnius/jnius.c:54433:5: error: expression is not assignable

    ++Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:54435:5: error: expression is not assignable

    --Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:54549:5: error: expression is not assignable

    ++Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:54551:5: error: expression is not assignable

    --Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:54803:5: error: expression is not assignable

    ++Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:54805:5: error: expression is not assignable

    --Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:55697:5: error: expression is not assignable

    ++Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:55699:5: error: expression is not assignable

    --Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:56008:5: error: expression is not assignable

    ++Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:56010:5: error: expression is not assignable

    --Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:56258:5: error: expression is not assignable

    ++Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:56260:5: error: expression is not assignable

    --Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:59573:16: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]

        return PyUnicode_FromUnicode(NULL, 0);

               ^

/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here

Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(

^

/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'

#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))

                                                     ^

jnius/jnius.c:60809:16: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]

        return PyUnicode_FromUnicode(NULL, 0);

               ^

/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here

Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(

^

/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'

#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))

                                                     ^

3 warnings and 12 errors generated.

error: command '/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang' failed with exit code 1





  STDERR:



[INFO]:    pyjnius first build failed (as expected)

[INFO]:    Running cython where appropriate

[INFO]:    Cythonize jnius/jnius.pyx

[DEBUG]:   -> running python3 -cimport sys; from Cython.Compiler.Main import setuptools_main; sys.exit(setuptools_main()); ./jnius/jnius.pyx

[DEBUG]:       /home/kivy/.local/lib/python3.10/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/pyjnius-sdl2/arm64-v8a__ndk_target_21/pyjnius/jnius/jnius.pyx

[DEBUG]:         tree = Parsing.p_module(s, pxd, full_module_name)

[DEBUG]:   -> running python3 setup.py build_ext -v

[DEBUG]:       warning: [options] bootstrap class path not set in conjunction with -source 7

[DEBUG]:       warning: [options] source value 7 is obsolete and will be removed in a future release

[DEBUG]:       warning: [options] target value 7 is obsolete and will be removed in a future release

[DEBUG]:       warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.

[DEBUG]:       4 warnings

[DEBUG]:       running build_ext

[DEBUG]:       building 'jnius' extension

[DEBUG]:       /home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include -DANDROID -I/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/include/python3.1 -fPIC -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c jnius/jnius.c -o build/temp.linux-x86_64-3.10/jnius/jnius.o

[DEBUG]:       jnius/jnius.c:12406:19: warning: assigning to 'jchar *' (aka 'unsigned short *') from 'const jchar *' (aka 'const unsigned short *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]

[DEBUG]:         __pyx_v_j_chars = (__pyx_v_j_env[0])->GetStringChars(__pyx_v_j_env, __pyx_v_j_string, NULL);

[DEBUG]:                         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:54433:5: error: expression is not assignable

[DEBUG]:           ++Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:54435:5: error: expression is not assignable

[DEBUG]:           --Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:54549:5: error: expression is not assignable

[DEBUG]:           ++Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:54551:5: error: expression is not assignable

[DEBUG]:           --Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:54803:5: error: expression is not assignable

[DEBUG]:           ++Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:54805:5: error: expression is not assignable

[DEBUG]:           --Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:55697:5: error: expression is not assignable

[DEBUG]:           ++Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:55699:5: error: expression is not assignable

[DEBUG]:           --Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:56008:5: error: expression is not assignable

[DEBUG]:           ++Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:56010:5: error: expression is not assignable

[DEBUG]:           --Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:56258:5: error: expression is not assignable

[DEBUG]:           ++Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:56260:5: error: expression is not assignable

[DEBUG]:           --Py_REFCNT(o);

[DEBUG]:           ^ ~~~~~~~~~~~~

[DEBUG]:       jnius/jnius.c:59573:16: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]

[DEBUG]:               return PyUnicode_FromUnicode(NULL, 0);

[DEBUG]:                      ^

[DEBUG]:       /home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here

[DEBUG]:       Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(

[DEBUG]:       ^

[DEBUG]:       /home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'

[DEBUG]:       #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))

[DEBUG]:                                                            ^

[DEBUG]:       jnius/jnius.c:60809:16: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]

[DEBUG]:               return PyUnicode_FromUnicode(NULL, 0);

[DEBUG]:                      ^

[DEBUG]:       /home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here

[DEBUG]:       Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(

[DEBUG]:       ^

[DEBUG]:       /home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'

[DEBUG]:       #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))

[DEBUG]:                                                            ^

[DEBUG]:       3 warnings and 12 errors generated.

[DEBUG]:       error: command '/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang' failed with exit code 1

Exception in thread background thread for pid 3002:

Traceback (most recent call last):

  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner

    self.run()

  File "/usr/lib/python3.10/threading.py", line 953, in run

    self._target(*self._args, **self._kwargs)

  File "/home/kivy/.local/lib/python3.10/site-packages/sh.py", line 1641, in wrap

    fn(*rgs, **kwargs)

  File "/home/kivy/.local/lib/python3.10/site-packages/sh.py", line 2569, in background_thread

    handle_exit_code(exit_code)

  File "/home/kivy/.local/lib/python3.10/site-packages/sh.py", line 2269, in fn

    return self.command.handle_command_exit_code(exit_code)

  File "/home/kivy/.local/lib/python3.10/site-packages/sh.py", line 869, in handle_command_exit_code

    raise exc

sh.ErrorReturnCode_1: 



  RAN: '/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3' setup.py build_ext -v



  STDOUT:

warning: [options] bootstrap class path not set in conjunction with -source 7

warning: [options] source value 7 is obsolete and will be removed in a future release

warning: [options] target value 7 is obsolete and will be removed in a future release

warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.

4 warnings

running build_ext

building 'jnius' extension

/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include -DANDROID -I/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/include/python3.1 -fPIC -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c jnius/jnius.c -o build/temp.linux-x86_64-3.10/jnius/jnius.o

jnius/jnius.c:12406:19: warning: assigning to 'jchar *' (aka 'unsigned short *') from 'const jchar *' (aka 'const unsigned short *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]

  __pyx_v_j_chars = (__pyx_v_j_env[0])->GetStringChars(__pyx_v_j_env, __pyx_v_j_string, NULL);

                  ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

jnius/jnius.c:54433:5: error: expression is not assignable

    ++Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:54435:5: error: expression is not assignable

    --Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:54549:5: error: expression is not assignable

    ++Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:54551:5: error: expression is not assignable

    --Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:54803:5: error: expression is not assignable

    ++Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:54805:5: error: expression is not assignable

    --Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:55697:5: error: expression is not assignable

    ++Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:55699:5: error: expression is not assignable

    --Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:56008:5: error: expression is not assignable

    ++Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:56010:5: error: expression is not assignable

    --Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:56258:5: error: expression is not assignable

    ++Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:56260:5: error: expression is not assignable

    --Py_REFCNT(o);

    ^ ~~~~~~~~~~~~

jnius/jnius.c:59573:16: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]

        return PyUnicode_FromUnicode(NULL, 0);

               ^

/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here

Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(

^

/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'

#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))

                                                     ^

jnius/jnius.c:60809:16: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]

        return PyUnicode_FromUnicode(NULL, 0);

               ^

/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here

Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(

^

/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'

#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))

                                                     ^

3 warnings and 12 errors generated.

error: command '/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang' failed with exit code 1





  STDERR:



[INFO]:    STDOUT (last 20 lines of 67):

    jnius/jnius.c:59573:16: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]    

        return PyUnicode_FromUnicode(NULL, 0);    

               ^    

/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here    

Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(    

^    

/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'    

#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))    

                                                     ^    

jnius/jnius.c:60809:16: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]    

        return PyUnicode_FromUnicode(NULL, 0);    

               ^    

/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here    

Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(    

^    

/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'    

#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))    

                                                     ^    

3 warnings and 12 errors generated.    

error: command '/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang' failed with exit code 1

[INFO]:    STDERR:

    

[INFO]:    ENV:

export HOME='/home/kivy'

export CFLAGS='-target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include'

export CXXFLAGS='-target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC'

export CPPFLAGS='-DANDROID -I/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/include/python3.1'

export LDFLAGS='  -L/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/libs_collections/myapp/arm64-v8a -L/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/android-build -lpython3.10 -L/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/libs_collections/myapp/arm64-v8a -L/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/libs_collections/myapp  -L/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/obj/local/arm64-v8a '

export LDLIBS='-lm'

export PATH='/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin:/home/kivy/.buildozer/android/platform/android-ndk-r25b:/home/kivy/.buildozer/android/platform/android-sdk/tools:/home/kivy/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/kivy/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/kivy/.local/bin/'

export CC='/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC'

export CXX='/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC'

export AR='/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar'

export RANLIB='/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib'

export STRIP='/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --strip-unneeded'

export READELF='/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-readelf'

export OBJCOPY='/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-objcopy'

export MAKE='make -j8'

export ARCH='arm64-v8a'

export NDK_API='android-21'

export LDSHARED='/home/kivy/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -shared'

export BUILDLIB_PATH='/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/lib.linux-x86_64-3.10'

export PYTHONNOUSERSITE='1'

export LANG='en_GB.UTF-8'

export PYTHONPATH='/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib:/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages:/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/scripts-3.10:/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/lib.linux-x86_64-3.10:/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/build/temp.linux-x86_64-3.10'

export LIBLINK='NOTNONE'

export COPYLIBS='1'

export LIBLINK_PATH='/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/pyjnius-sdl2/arm64-v8a__ndk_target_21/objects_pyjnius'

export NDKPLATFORM='NOTNONE'



[INFO]:    COMMAND:

cd /home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/pyjnius-sdl2/arm64-v8a__ndk_target_21/pyjnius && /home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py build_ext -v



[WARNING]: ERROR: /home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 failed!



# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch arm64-v8a --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/kivy/桌面/demo/IOT-phone/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a" --ndk-api=21 --ignore-setup-py --debug

# ENVIRONMENT:

#     SHELL = '/bin/bash'

#     SESSION_MANAGER = 'local/kivy-VirtualBox:@/tmp/.ICE-unix/1762,unix/kivy-VirtualBox:/tmp/.ICE-unix/1762'

#     QT_ACCESSIBILITY = '1'

#     COLORTERM = 'truecolor'

#     XDG_CONFIG_DIRS = '/etc/xdg/xdg-ubuntu:/etc/xdg'

#     SSH_AGENT_LAUNCHER = 'gnome-keyring'

#     XDG_MENU_PREFIX = 'gnome-'

#     GNOME_DESKTOP_SESSION_ID = 'this-is-deprecated'

#     LANGUAGE = 'zh_CN:zh'

#     GNOME_SHELL_SESSION_MODE = 'ubuntu'

#     SSH_AUTH_SOCK = '/run/user/1000/keyring/ssh'

#     XMODIFIERS = '@im=ibus'

#     DESKTOP_SESSION = 'ubuntu'

#     GTK_MODULES = 'gail:atk-bridge'

#     DBUS_STARTER_BUS_TYPE = 'session'

#     PWD = '/home/kivy/桌面/demo/IOT-phone'

#     LOGNAME = 'kivy'

#     XDG_SESSION_DESKTOP = 'ubuntu'

#     XDG_SESSION_TYPE = 'wayland'

#     SYSTEMD_EXEC_PID = '1762'

#     XAUTHORITY = '/run/user/1000/.mutter-Xwaylandauth.UT7M81'

#     HOME = '/home/kivy'

#     USERNAME = 'kivy'

#     IM_CONFIG_PHASE = '1'

#     LANG = 'zh_CN.UTF-8'

#     LS_COLORS = 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'

#     XDG_CURRENT_DESKTOP = 'ubuntu:GNOME'

#     VTE_VERSION = '6800'

#     WAYLAND_DISPLAY = 'wayland-0'

#     GNOME_TERMINAL_SCREEN = '/org/gnome/Terminal/screen/c64e66d4_862c_42fe_affe_725747b60f49'

#     GNOME_SETUP_DISPLAY = ':1'

#     LESSCLOSE = '/usr/bin/lesspipe %s %s'

#     XDG_SESSION_CLASS = 'user'

#     TERM = 'xterm-256color'

#     LESSOPEN = '| /usr/bin/lesspipe %s'

#     USER = 'kivy'

#     GNOME_TERMINAL_SERVICE = ':1.101'

#     DISPLAY = ':0'

#     SHLVL = '1'

#     QT_IM_MODULE = 'ibus'

#     DBUS_STARTER_ADDRESS = 'unix:path=/run/user/1000/bus,guid=b6ad976eb77c07365ef1ccd664b0ee06'

#     XDG_RUNTIME_DIR = '/run/user/1000'

#     XDG_DATA_DIRS = '/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop'

#     PATH = '/home/kivy/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/kivy/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/kivy/.local/bin/'

#     GDMSESSION = 'ubuntu'

#     DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus,guid=b6ad976eb77c07365ef1ccd664b0ee06'

#     _ = '/home/kivy/.local/bin/buildozer'

#     PACKAGES_PATH = '/home/kivy/.buildozer/android/packages'

#     ANDROIDSDK = '/home/kivy/.buildozer/android/platform/android-sdk'

#     ANDROIDNDK = '/home/kivy/.buildozer/android/platform/android-ndk-r25b'

#     ANDROIDAPI = '30'

#     ANDROIDMINAPI = '21'

# 

# 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



```

  • 写回答

1条回答 默认 最新

  • CSDN-Ada助手 CSDN-AI 官方账号 2023-07-14 16:24
    关注
    • 这篇博客: 一文速学-Python联通调用JAVA的桥梁PyJnius库详解中的 前言 部分也许能够解决你的问题, 你可以仔细阅读以下内容或跳转源博客中阅读:
    • 最近一直在研究HiveSQL的源码以及ANTLR包的源码,比较无奈的是工程上我还是偏向于使用Pycharm和python编程语言。其实编程语言选择都无所谓只是工具罢了,主要的是其中解析抽象树AST的思想以及方法。但是基础的语法方法需要掌握,比如Python调库以及引用,JAVA的import规则以及jar包的引用。要做成工程化的程序,程序员就必须有一定的工具使用能力,比如anaconda和IDEA的基础使用方法,做HiveSQL血缘分析的时候遇到了很多大坑以及众多BUG报错,对于自身代码能力和解决问题的能力也有一定的成长。好了废话不多说,就让我们来研究如何来使用该库实现相应功能吧。博主将长期维护自己博客的文章,如有披露错误或者不理解之处请尽情在评论区留下发言。希望能够帮助到需要掌握该库的各位。


    • 以下回答由chatgpt基于相关博客总结生成:

      回答:

      针对你的问题,如何正确配置buildozer以便成功打包你的应用程序并解决与pyjnius库相关的问题,我可以给出一些具体的解决方案。

      1. 确保你已经正确安装了buildozer和pyjnius库。你可以通过以下命令来安装pyjnius库:
      pip3 install pyjnius
      

      或者使用清华大学的镜像源来安装:

      pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pyjnius
      
      1. 在buildozer.spec文件中,确保你已正确配置了依赖库。在requirements字段中添加pyjnius库的依赖项。例如:
      requirements = pyjnius
      
      1. 在buildozer.spec文件中,确保你已正确配置了Python和Java的版本。在python.version和android.api字段中指定所需的版本。例如:
      python.version = 3.7.0
      android.api = 27
      
      1. 确保你已正确设置了JAVA_HOME和PATH环境变量。在终端中执行以下命令来检查Java的安装和正确的环境变量配置:
      java -version
      

      确保输出的结果显示正确的Java版本信息。

      1. 在你的Python代码中,使用pyjnius调用Java的类或方法之前,确保已正确导入pyjnius库并创建了必要的Java对象。例如:
      from jnius import autoclass
      
      Stack = autoclass('java.util.Stack')
      stack = Stack()
      stack.push('hello world')
      
      1. 执行buildozer命令来打包你的应用程序。在终端中进入到你的应用程序目录,并执行以下命令:
      buildozer android debug
      

      这将会使用buildozer来构建一个debug版本的Android应用程序。

      如果你按照以上步骤进行配置和操作,应该能够成功打包你的应用程序并解决与pyjnius库相关的问题。如果你遇到了其他问题或者以上步骤没有解决你的问题,请提供更多详细的错误信息和上下文,我将尽力帮助你解决。

    评论

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 7月27日
  • 修改了问题 7月14日
  • 创建了问题 7月14日

悬赏问题

  • ¥15 如何构建全国统一的物流管理平台?
  • ¥100 ijkplayer使用AndroidStudio/CMake编译,如何支持 rtsp 直播流?
  • ¥15 用js遍历数据并对非空元素添加css样式
  • ¥15 使用autodl云训练,希望有直接运行的代码(关键词-数据集)
  • ¥50 python写segy数据出错
  • ¥20 关于线性结构的问题:希望能从头到尾完整地帮我改一下,困扰我很久了
  • ¥30 3D多模态医疗数据集-视觉问答
  • ¥20 设计一个二极管稳压值检测电路
  • ¥15 内网办公电脑进行向日葵
  • ¥15 如何输入双曲线的参数a然后画出双曲线?我输入处理函数加上后就没有用了,不知道怎么回事去掉后双曲线可以画出来