我是kivy的新人。我做了一个应用程序,它在PC上工作正常。但是当我在移动设备上运行它时,它会变得很迷人。我使用adb logcat签到了我收到此类错误。你能帮忙吗
I / python(25833):[警告]调用已弃用的函数 init /home/rup/workspace/TeachersApp/.buildozer/android/platform/build/dists/artoflivingteachersupport/private/lib/python2.7/site-packages/kivy/uix/listview.py 第846行。来自 /home/rup/workspace/TeachersApp/.buildozer/android/platform/build/dists/artoflivingteachersupport/private/lib/python2.7/site-packages/kivy/lang/builder.py 第564行由_apply_rule()。 I / python(25833):[警告]致电 已弃用的功能 init /home/rup/workspace/TeachersApp/.buildozer/android/platform/build/dists/artoflivingteachersupport/private/lib/python2.7/site-packages/kivy/adapters/adapter.py 第112条。来自 /home/rup/workspace/TeachersApp/.buildozer/android/platform/build/dists/artoflivingteachersupport/private/lib/python2.7/site-packages/kivy/adapters/simplelistadapter.py 54行 init ()。 I / python(25833):[警告]要求弃用 功能 init in /home/rup/workspace/TeachersApp/.buildozer/android/platform/build/dists/artoflivingteachersupport/private/lib/python2.7/site-packages/kivy/uix/abstractview.py 第43行。来自 /home/rup/workspace/TeachersApp/.buildozer/android/platform/build/dists/artoflivingteachersupport/private/lib/python2.7/site-packages/kivy/uix/listview.py 第866行由 init ()组成。 I / python(25833):[警告]致电 已弃用的功能 init /home/rup/workspace/TeachersApp/.buildozer/android/platform/build/dists/artoflivingteachersupport/private/lib/python2.7/site-packages/kivy/adapters/adapter.py 第112条。来自 /home/rup/workspace/TeachersApp/.buildozer/android/platform/build/dists/artoflivingteachersupport/private/lib/python2.7/site-packages/kivy/adapters/listadapter.py 185行 init ()。 I / python(25833):[警告] [基础] 未知提供者I / python(25833):[INFO] [Base] 启动应用程序主循环I / python(25833):[ERROR] [Base
]无法导入“android”模块。无法删除android presplash。 I / python(25833):[警告]调用已弃用的函数 /home/rup/workspace/TeachersApp/.buildozer/android/platform/build/dists/artoflivingteachersupport/private/lib/python2.7/site-packages/kivy/uix/selectableview.py中的 init 第39行。来自 /home/rup/workspace/TeachersApp/.buildozer/android/platform/build/dists/artoflivingteachersupport/private/lib/python2.7/site-packages/kivy/uix/listview.py 第594行由 init ()组成。 I / python(25833):[INFO] [基础] 让应用程序进行中... I / python(25833):Python for android结束了。 I / DEBUG(26018):#00 pc 000bf63a /data/app/org.aolsc.artoflivingteachersupport-2/lib/arm/libpython2.7.so (PyThreadState_New + 93)I / DEBUG(26018):#01 pc 000c9975 /data/app/org.aolsc.artoflivingteachersupport-2/lib/arm/libpython2.7.so (PyThread_acquire_lock + 76)
答案 0 :(得分:1)
[Base] Failed to import "android" module. Could not remove android presplash.
I/python (25833): [WARNING] Call to deprecated function init in /home/rup/workspace/TeachersApp/.buildozer/android/platform/build/dists/artoflivingteachersupport/private/lib/python2.7/site-packages/kivy/uix/selectableview.py line 39.
Called from /home/rup/workspace/TeachersApp/.buildozer/android/platform/build/dists/artoflivingteachersupport/private/lib/python2.7/site-packages/kivy/uix/listview.py line 594 by init().
I/python (25833): [INFO ] [Base ] Leaving application in progress...
I/python (25833): Python for android ended.
我坚信错误在其他地方,因为android
模块不会崩溃任何东西,只会通知用户它无法删除预分区,因为它不可用。
如果android
模块负责,则不会有关于ListView
的下一行,它就会在那里崩溃。另外,ListView
已经过时了,你应该用RecycleView
替换它,因为它更可靠和更好。