使用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