问题描述
我的 Kivy 应用在 Android 手机上启动时崩溃.buildozer logcat 显示如下错误:
My Kivy app crashes on launch on android phone. buildozer logcat shows the following error:
02-21 17:09:58.777 14941 14979 I python : ModuleNotFoundError: No module named 'PIL'
02-21 17:09:58.777 14941 14979 I python : Python for android ended.
这是我的 buildozer.spec 要求:
Here are my buildozer.spec requirements:
requirements = python3,kivy==2.0.0,git+https://github.com/HeaTTheatR/KivyMD.git,sdl2_ttf==2.0.15,python-dateutil,requests,urllib3,chardet,idna,plyer,android,jnius,oscpy
据我了解,只有 KivyMD 依赖于 PIL.该应用程序在我的 Mac 上完美运行,并且之前在 android 手机上运行过.错误刚刚开始发生.所以,我真的很困惑,希望能得到任何帮助.提前致谢!
As I understand, only the KivyMD depends on PIL. The app works perfectly on my mac and WAS working before on the android phone. The error just started to occur. So, I'm really confused and would appreciate any help. Thanks in advance!
推荐答案
您可能已经知道,KivyMD 依赖于 PIL,而不是 Kivy.您在应用程序中使用最新版本的 KivyMD,这取决于 PIL.要消除错误,只需在 buildozer.spec 文件的 requirements 中添加 pillow.
As you might already know, KivyMD depends on PIL, not Kivy. You are using the latest version of KivyMD using git in your app, which depends on PIL. To remove the error just add pillow in the requirements of your buildozer.spec file.
这篇关于kivymd 应用程序在 Android 手机上崩溃 ModuleNotFoundError: No module named 'PIL'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)