Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
793 views
in Technique[技术] by (71.8m points)

android - Python/Kivy app to apk on windows - what to do after installing a virtual machine?

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.

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!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

Kivy Buildozer Virtual Machine Setup

  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 Setup

  1. Download PyCharm Community and install it.
  2. Install KV Lang Auto-completion and Highlighting
  3. Please refer to PyCharm Project Interpreter Setup

Create a Package for Android

  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!

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...