使用 buildozer 为 android 构建 kivy 应用程序时出错

Error building kivy app for android with buildozer

总的来说,我对 Kivy 和应用程序开发还比较陌生。我做了一个简单的应用程序,想尝试使用 buildozer 创建一个 apk 文件。我运行以下命令:

$ buildozer android debug

我得到一个以以下结尾的日志:

# 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

经过查找日志,发现出错的命令:

$ /home/myusername/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager

输出:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/myusername/miniconda3/envs/APP/jre/lib/amd64/libnio.so: libnet.so: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1843)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at sun.nio.fs.UnixNativeDispatcher.run(UnixNativeDispatcher.java:573)
    at sun.nio.fs.UnixNativeDispatcher.run(UnixNativeDispatcher.java:571)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.nio.fs.UnixNativeDispatcher.<clinit>(UnixNativeDispatcher.java:571)
    at sun.nio.fs.UnixFileSystem.<init>(UnixFileSystem.java:67)
    at sun.nio.fs.LinuxFileSystem.<init>(LinuxFileSystem.java:39)
    at sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSystemProvider.java:46)
    at sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSystemProvider.java:39)
    at sun.nio.fs.UnixFileSystemProvider.<init>(UnixFileSystemProvider.java:56)
    at sun.nio.fs.LinuxFileSystemProvider.<init>(LinuxFileSystemProvider.java:41)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at java.lang.Class.newInstance(Class.java:442)
    at sun.nio.fs.DefaultFileSystemProvider.createProvider(DefaultFileSystemProvider.java:48)
    at sun.nio.fs.DefaultFileSystemProvider.create(DefaultFileSystemProvider.java:63)
    at java.nio.file.FileSystems$DefaultFileSystemHolder.getDefaultProvider(FileSystems.java:108)
    at java.nio.file.FileSystems$DefaultFileSystemHolder.access[=12=]0(FileSystems.java:89)
    at java.nio.file.FileSystems$DefaultFileSystemHolder.run(FileSystems.java:98)
    at java.nio.file.FileSystems$DefaultFileSystemHolder.run(FileSystems.java:96)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.nio.file.FileSystems$DefaultFileSystemHolder.defaultFileSystem(FileSystems.java:96)
    at java.nio.file.FileSystems$DefaultFileSystemHolder.<clinit>(FileSystems.java:90)
    at java.nio.file.FileSystems.getDefault(FileSystems.java:176)
    at com.android.repository.io.impl.FileOpImpl.getFileSystem(FileOpImpl.java:37)
    at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:57)
    at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)

我已经检查过,这两个提到的文件都存在:

/home/myusername/miniconda3/envs/APP/jre/lib/amd64/libnio.so
/home/myusername/miniconda3/envs/APP/jre/lib/amd64/libnet.so

有人知道我能做什么吗?

我认为您的安装可能出了问题,请尝试重新安装 buildozer。

https://buildozer.readthedocs.io/en/latest/installation.html