我正在尝试使用.so
文件构建 APK。当我运行时buildozer android debug deploy run logcat > logcat.txt
,我构建的应用程序在我的手机上崩溃,我得到以下输出:
E/linker (18499): load_library(linker.cpp:757): library "/data/data/org.test.myapp/files/sdk/qi/../libqimessaging.so" not found
E/linker (18499): load_library(linker.cpp:757): library "/data/data/org.test.myapp/files/sdk/qi/../libqipython.so" not found
E/linker (18499): load_library(linker.cpp:757): library "/data/data/org.test.myapp/files/sdk/qi/../libqipython.so" not found
I/python (18499): Traceback (most recent call last):
I/python (18499): File "/home/dan/kivytest/.buildozer/android/app/main.py", line 7, in <module>
I/python (18499): File "/home/dan/kivytest/.buildozer/android/app/sdk/naoqi.py", line 7, in <module>
I/python (18499): File "/home/dan/kivytest/.buildozer/android/app/sdk/qi/__init__.py", line 72, in <module>
I/python (18499): ImportError: No module named _qi
在文件中包含sdk/qi/__init__.py
了一堆.so
文件。因为包含失败,后来的导入失败,应用程序崩溃。
我认为这是由于.so
文件未正确复制到/data/data/org.test.myapp/files/sdk
文件夹中。我不知道该怎么做。这是我到目前为止所尝试的:
android.add_src = /home/dan/kivytest/sdk
android.add_libs_armeabi = /home/dan/kivytest/sdk/*.so
android.library_references = /home/dan/kivytest/sdk
add_libs_armeabi
导致.so
文件被复制到lib/armebi
APK 中的文件夹。除此之外,我似乎无法将文件复制到正确的位置。我错过了什么?