2

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!

Auggie
  • 43
  • 1
  • 6
  • [this page](https://python-for-android.readthedocs.io/en/latest/quickstart/) has instructions – tomasantunes May 02 '18 at 09:56
  • @darkangel - Thanks for the link! I have seen that page before, and unfortunately it's not very beginner-friendly. I couldn't follow it because it skips too many steps along the way. – Auggie May 02 '18 at 16:26
  • @ikolim - Thank you so much for the detailed answer! I get through the first section just fine, but every time I start the virtual machine the cursor freezes and I end up having to shut down windows. I've tried uninstalling and reinstalling several times, but always get the same outcome. I'm using the latest version of windows 10 on a computer that is only a few months old, so not sure what else I can do to fix this. :( – Auggie May 06 '18 at 21:28

1 Answers1

3

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!
Community
  • 1
  • 1
ikolim
  • 15,721
  • 2
  • 19
  • 29
  • This does not work as you say. The virtual machine nor with v34 (stable) nor master work without hacks. The sources have changed as well so the hacks in github/issues are hard to follow. I have spend weeks with this. I am only able to run my applications in launcher. I have not been able to find instructions to compile android apks that actually works. Nor installing, nor using the virtual machine provided or installing my own virtual machine. From compiling errors, to not found files. I love the kivy stuff but is utterly frustrating. This is extremely hard to configure. – Julian C Jun 12 '18 at 21:10
  • If you encountered ***IOError: [Errno 2] No such file or directory***, the solution can be found at [IOError: Errno 2 No such file or directory](https://stackoverflow.com/questions/50814579/ioerror-errno-2-no-such-file-or-directory-build-outputs-apk-yolo-debug-a) – ikolim Jun 13 '18 at 14:08
  • thanks for reaching back. I saw the hack. I believe that the file has evolved since the hack was posted and the line number now does not match the expected place. I was unsure and decided to stay put. I I will give it a try over the weekend. Will come back to you with results. – Julian C Jun 13 '18 at 20:24