Python Kivy:更改 defaulttheme-0.png 不会改变最终的 .apk 设计 [英] Python Kivy: Changing defaulttheme-0.png won't change final .apk design

查看:51
本文介绍了Python Kivy:更改 defaulttheme-0.png 不会改变最终的 .apk 设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我更改 Python Kivy 安装的 defaulttheme-0.png 时,我的应用在 Ubuntu 上以 .py 启动时看起来不同.但是,如果我现在将它转换"为 .apk 并在我的手机(Android 5.1.2)上运行它,它会像以前一样显示,而主题没有改变.我该怎么做,才能告诉 kivy/buildozer 将主题集成到 .apk 中?

When I change the defaulttheme-0.png of my Python Kivy installation, my App appears different when launching it as .py on Ubuntu. But if I now "convert" it to an .apk and run it on my mobile (Android 5.1.2) it appears as before, without the theme being changed. What do I have to do, to tell kivy/buildozer to integrate the theme into the .apk?

我尝试过的:- 通常运行sudo buildozer android debug"- 删除sudo buildozer init"创建的所有文件并再次调用该文件- 当然我搜索了谷歌,但我没有找到任何东西,我希望你能帮助我,因为我的应用程序在解决这个问题后就快完成了......

What I tried: - Normally running "sudo buildozer android debug" - Deleting all files created by "sudo buildozer init" and calling that one again - And of course I searched Google, but as I didn't found anything, I hope you can help me, because my App would be almost done after fixing that problem...

推荐答案

不要在本地 kivy 安装中更改主题,而是将图像放在应用程序目录中名为 data/images 的文件夹中(即 ./data/images/defaulttheme-0.png 来自您的应用脚本).

Instead of changing the theme in a local kivy installation, place the image in a folder named data/images in your app's directory (i.e. ./data/images/defaulttheme-0.png from your app script).

Tshirtman 指出,还需要将 atlas 文件复制到此位置.

it is also necessary to copy the atlas file to this location, as noted by Tshirtman.

这篇关于Python Kivy:更改 defaulttheme-0.png 不会改变最终的 .apk 设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆