Building .so files with Buildozer

713 views Asked by At

I'm trying to build an APK with .so files. When I run buildozer android debug deploy run logcat > logcat.txt, my built app crashes on my phone and I get the following output:

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

In the file sdk/qi/__init__.py a bunch of .so files gets included. Because the includes fail, the later import fails and the app crashes.

I assume this is due to the .so files are not copied over properly into the /data/data/org.test.myapp/files/sdk folder. And I have no clue how to do that. This is what I tried so far:

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 causes the .so files to be copied to the lib/armebi folder in the APK. Other than that, I don't seem to be able to copy files to their right location. What am I missing?

1

There are 1 answers

2
dan-klasson On BEST ANSWER

The answer is pretty obvious. I totally missed the source.include_exts option. All one has to do is add file extension there.