Search code examples
pythonjavaandroidkivybuildozer

Error building kivy app for android with buildozer


I am fairly new to Kivy and app development in general. I made a simple app and wanted to try creating an apk file using buildozer. I ran the following command:

$ buildozer android debug

I get a log that ends with:

# 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

After searching the log, I found the command that goes wrong:

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

Output:

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$1.run(UnixNativeDispatcher.java:573)
    at sun.nio.fs.UnixNativeDispatcher$1.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$000(FileSystems.java:89)
    at java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:98)
    at java.nio.file.FileSystems$DefaultFileSystemHolder$1.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)

I have checked and both these mentioned files exist:

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

Does anyone know what I could do?


Solution

  • I think something probably has gone wrong with your installation, try reinstalling buildozer.

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