Kivy 应用程序在 Android 崩溃

Kivy app crashes on Android

我正在尝试 运行 在我的 android device.The 应用 运行 上用 kivy 制作的一个简单的 hello world 应用 linux 但是在 android.I 上打开时立即崩溃安装了很多软件包来解决问题,但错误仍然存​​在。这是输出 adb logcat 当我使用 buildozer android logcat:

时也是如此
 dlopen("/data/data/org.test.myapp/files/lib/python2.7/lib-dynload/_sqlite3.so", RTLD_LAZY) failed: dlopen failed: library "/data/data/org.test.myapp/files/lib/python2.7/lib-dynload/_sqlite3.so" not found
E/art (881): dlopen("/data/data/org.test.myapp/files/lib/python2.7/lib-dynload/_imaging.so", RTLD_LAZY) failed: dlopen failed: library "/data/data/org.test.myapp/files/lib/python2.7/lib-dynload/_imaging.so" not found
I/python  (  881): Starting audio thread
I/libSDL  (  881): Physical screen resolution is 720x1280
I/python  (  881): Initialize Python for Android
D/        (  762): batch called handle:1 sample_ns:66667000 latency_ns:0
D/        (  762): MPU6880 3-axis Accelerometer calling driver setDelay 66 ms
I/python  (  881): ['/data/data/org.test.myapp/files/lib/python2.7/site-packages', '/data/data/org.test.myapp/files/lib/site-python']
I/python  (  881): Android path ['/data/data/org.test.myapp/files/lib/python27.zip', '/data/data/org.test.myapp/files/lib/python2.7', '/data/data/org.test.myapp/files/lib/python2.7/lib-dynload', '/data/data/org.test.myapp/files/lib/python2.7/site-packages', '/data/data/org.test.myapp/files', '/data/data/org.test.myapp/files/_applibs']
I/python  (14163): Android kivy bootstrap done. __name__ is __main__
I/python  (14163): Run user program, change dir and execute main.py
I/python  (14163): No main.pyo / main.py found.
I/art     (14163): System.exit called, status: 0
I/AndroidRuntime(14163): VM exiting with result code 0, cleanup skipped.
W/InputDispatcher(  762): channel '2457e5a7 org.test.myapp/org.renpy.android.PythonActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
E/InputDispatcher(  762): channel '2457e5a7 org.test.myapp/org.renpy.android.PythonActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
I/WindowState(  762): WIN DEATH: Window{2457e5a7 u0 org.test.myapp/org.renpy.android.PythonActivity}
W/InputDispatcher(  762): Attempted to unregister already unregistered input channel '2457e5a7 org.test.myapp/org.renpy.android.PythonActivity (server)'
W/WindowManager(  762): Force-removing child win Window{17a9e29f u0 SurfaceView} from container Window{2457e5a7 u0 org.test.myapp/org.renpy.android.PythonActivity}
W/WindowManager(  762): Failed looking up window
W/WindowManager(  762): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@78fda54 does not exist
W/WindowManager(  762):     at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8510)
W/WindowManager(  762):     at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8501)
W/WindowManager(  762):     at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1111)
W/WindowManager(  762):     at android.os.BinderProxy.sendDeathNotice(Binder.java:551)
I/WindowState(  762): WIN DEATH: null
I/ActivityManager(  762): Process org.test.myapp:python (pid 14163) has died
W/ActivityManager(  762): Force removing ActivityRecord{8a9eaea u0 org.test.myapp/org.renpy.android.PythonActivity t294}: app died, no saved state
W/InputMethodManagerService(  762): Got RemoteException sending setActive(false) notification to pid 14163 uid 10122

根据您的日志,找到这 2 行

I/python  (14163): Run user program, change dir and execute main.py
I/python  (14163): No main.pyo / main.py found.

说它搜索 main.py 但找不到。因此,将您的文件重命名为 main.py 并重建。