使用kivy和bluepy将python3应用程序从Linux移植到Android [英] porting a python3 app from Linux to Android using kivy and bluepy

查看:107
本文介绍了使用kivy和bluepy将python3应用程序从Linux移植到Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在python3中使用Kivy创建了一个简单的应用程序用于UI,并使用bluepy访问了一些Bluetooth BLE设备. 现在,我想将应用程序移植到我的Android手机上.我看到Kivy在某种程度上可以移植到Android( https://github.com/kivy/python-for-android ).但是我不确定是否可以使用bluepy依赖项来移植我的应用程序.

I created a simple app in python3 using Kivy for the UI and bluepy to access some Bluetooth BLE devices. Now I like to port the app to my Android phone. I saw there is somehow a port in Kivy to Android (https://github.com/kivy/python-for-android). But I am not sure if I can port my app with the bluepy dependency.

因此归结为以下问题:

1st)是否可以将kivy和bluepy应用程序移植到Android?

1st) is it possible to port a kivy and bluepy app to Android?

2nd)上有显示该操作方法的教程吗?

2nd) is there a tutorial showing how to do that?

推荐答案

您可以使用Buildozer打包Android应用.您可以使用Kivy网站上的本指南来完成此操作.如果使用Windows,则可以使用WSL(Linux的Windows子系统).这是指南.我已经用它来打包了Android应用程式. (通过我从Windows应用商店安装Ubuntu的方式.)请记住,这是命令行,而不是GUI(图形用户界面).希望我的回答对您有用! (如果遇到任何错误,请确保发表评论.)

You can package an Android app using Buildozer. You can do it using this guide on the Kivy website. If you are using Windows you can use the WSL (Windows Subsystem for Linux). Here is a guide. I have used it to package my Android app. (By the way I installed Ubuntu from the Windows Store.) Keep in mind that this is a command-line, not a GUI (Graphical User Interface). Hope my answer works for you! (If you get any errors, make sure to comment.)

您需要在buildozer.spec文件的需求变量中包括"bluepy".

You need to include "bluepy" in the requirements variable in the buildozer.spec file.

这篇关于使用kivy和bluepy将python3应用程序从Linux移植到Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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