简体   繁体   English

Kivy Launcher 在使用包含 kivy 代码的工作 Python 脚本加载 .kv 文件后关闭

[英]Kivy Launcher closes after loading .kv file with a working python script containing kivy code

I have been learning how to use kivy as an GUI and touch navagation for android.我一直在学习如何使用 kivy 作为 GUI 并为 android 触摸导航。 I won't post any code, that may limit any answer that could fix the problem.我不会发布任何代码,这可能会限制任何可以解决问题的答案。 The problem I'm having is that I cannnot run python scripts with a .kv file named after the Main Class (all lowercase without 'app' in its name) with the build method.我遇到的问题是,我无法使用 build 方法运行带有以主类命名的 .kv 文件(名称中没有“app”的所有小写字母)的 python 脚本。 Kivy Loads the files, then a black screen, then kivy quits. Kivy 加载文件,然后黑屏,然后 kivy 退出。 I have been able to run python scripts that contain kivy code and they work.我已经能够运行包含 kivy 代码的 python 脚本并且它们可以工作。

The question is how to get the Kivy Lauuncher for android (version '1.9.1 1' from google play) to run a python file wtih a .kv file without close after opening.问题是如何让 Kivy Launcher for android(来自 google play 的版本“1.9.1 1”)在打开后不关闭的情况下运行带有 .kv 文件的 python 文件。

I have tried tutorals and searched on the web (this site included), even kivy's own web site, and they have not worked.我试过教程并在网上搜索(包括这个网站),甚至是kivy自己的网站,都没有奏效。

I Will be greatly appreciate with any help, ideas, or suggestions.如果有任何帮助、想法或建议,我将不胜感激。

Does this work on your PC?这在您的 PC 上有效吗? Also Kivy Launcher is quite outdated. Kivy Launcher 也已经过时了。 You should try using Buildozer to make an APK.您应该尝试使用 Buildozer 制作 APK。 Also could you share your KV file?你也可以分享你的KV文件吗? Maybe there is an error in that.也许这里面有一个错误。 Hope I helped!希望我有所帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM