在Windows上将Python/Kivy应用程序转换为APK-安装虚拟机后该怎么办? [英] Python/Kivy app to apk on windows - what to do after installing a virtual machine?

查看:968
本文介绍了在Windows上将Python/Kivy应用程序转换为APK-安装虚拟机后该怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解当前无法使用Windows为Android打包kivy应用程序,因此我已经下载了Linux虚拟机.但是那又怎样呢?对于初学者,我没有找到一个很好的分步教程来解释整个过程.

I understand that currently there is no way to package a kivy app for android using windows, so I have downloaded a Linux virtual machine. But then what? I haven't found a good step-by-step tutorial for beginners explaining the whole process.

我是否应该将Python,PyCharm,Kivy等下载到虚拟机中,并将所有应用程序文件复制到其中?如果是这样,那之后的下一步是什么?抱歉,这么笨,但是我是编码和应用程​​序开发的新手,并且主要从在线教程中学习.任何意见是极大的赞赏!

Am I supposed to download Python, PyCharm, Kivy, etc. into the virtual machine, and also copy the all the app files into it? And if so, what's the next step after that? Sorry to be so clueless, but I'm new to coding and app development, and learning mostly from online tutorials. Any advice is greatly appreciated!

推荐答案

您可以通过执行以下操作将Windows上的Kivy Apps for Windows打包:

You can package Kivy Apps for Android on Windows by doing the following:

  1. 下载 Kivy Buildozer VM 并解压缩文件.
  2. Oracle VirtualBox下载区下载适用于您计算机的VirtualBox版本并安装它.
  3. 下载适用于所有平台的Oracle VM VirtualBox扩展包并安装它.
  4. 启动 VirtualBox ,单击文件»导入设备...
  5. 选择提取的目录,文件名为 Buildozer VM.ovf
  6. 单击设置»常规»高级,然后在下拉列表中选择 Bidirectional >共享剪贴板":拖放":
  7. 点击设置»共享文件夹,然后点击添加新的共享文件夹. Kivy Apps文件夹.
  8. 单击设置» USB ,选中启用USB控制器,选中 USB 2.0(EHCI)控制器,然后点击添加新的USB过滤器,例如宏cer平板电脑.
  1. Download Kivy Buildozer VM and unzip the file.
  2. Download the version of VirtualBox for your machine from Oracle VirtualBox download area and install it.
  3. Download Oracle VM VirtualBox Extension Pack for all platforms and install it.
  4. Start VirtualBox, click on File » Import Appliance...
  5. Select the extracted directory, file named, Buildozer VM.ovf
  6. Click on Settings » General » Advanced and select Bidirectional in the drop-down list for Shared Clipboard:, and Drag'n'Drop:
  7. Click on Settings » Shared Folders and click Adds new shared folder. e.g. Kivy Apps folder.
  8. Click on Settings » USB, check Enable USB Controller, checkbox USB 2.0 (EHCI) Controller, and click Adds new USB filters e.g. Acer tablet.

PyCharm IDE设置

  1. 下载 PyCharm社区并安装它.
  2. 安装 KV Lang自动完成并突出显示
  3. 请参考 PyCharm项目解释器设置
  1. Download PyCharm Community and install it.
  2. Install KV Lang Auto-completion and Highlighting
  3. Please refer to PyCharm Project Interpreter Setup

创建Android程序包

  1. 启动 VirtualBox ,选择 Kivy/Buildozer VM ,然后单击 Start
  2. 密码是 kivy
  3. 将您的Kivy App从本地计算机复制到 Home 文件夹中的文件夹.
  4. 双击主文件夹
  5. 双击 Kivy App文件夹
  6. 右键单击并选择在此处打开终端
  7. 在终端命令提示符下,键入buildozer init以创建 buildozer.spec 文件.
  8. 双击 buildozer.spec 文件进行更改(例如 title package.name log_level = 2 )并保存更改.
  9. 在终端命令提示符下,键入buildozer android debug deploy run
  10. 享受!
  1. Start VirtualBox, select Kivy/Buildozer VM and click Start
  2. Password is kivy
  3. Copy your Kivy App from local machine to a folder in Home folder.
  4. Double click Home folder
  5. Double click Kivy App folder
  6. Right mouse click and select Open Terminal Here
  7. At Terminal command prompt, type buildozer init to create buildozer.spec file.
  8. Double click buildozer.spec file to make changes (e.g. title, package.name, log_level = 2) and save changes.
  9. At Terminal command prompt, type buildozer android debug deploy run
  10. Enjoy!

这篇关于在Windows上将Python/Kivy应用程序转换为APK-安装虚拟机后该怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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