Easy tutorial to package for Android

331 views
Skip to first unread message

Maxburg

unread,
Oct 4, 2014, 7:26:11 AM10/4/14
to kivy-...@googlegroups.com
I'm new to programming and have installed Python and Kivy. No problem writing programs but when I try to package for Android the tutorials I find are targeted at developers and no use if you're not an experienced programmer (or at least not if you're an idiot like me.... I use Windows and have installet Virtualbox and downloaded Buildozer but cannot understand from the tutorials how to proceed from there. Is there anyone that can point me to or give me some 'for dummies' instructions on how to proceed? I don't even understand where to type the command lines stated in the tutorials..  Many thanks 

Maxburg

unread,
Oct 4, 2014, 10:11:55 AM10/4/14
to kivy-...@googlegroups.com
Finally I can access the Virtualbox Ubuntu interface and open the command tool. Do I need Buildozer or can I produce an APK directly?

Maxburg

unread,
Oct 5, 2014, 5:58:31 AM10/5/14
to kivy-...@googlegroups.com
Tried Buildozer but when i run 'buildozer android debug deploy run I get 'BUILD FAILED /home/kivy/.buildozer/android/platform/android-sdk-21/tools/ant/build.xml:483: SDK does not have any Build Tools installed. Any ideas what causes this?


On Saturday, October 4, 2014 1:26:11 PM UTC+2, Maxburg wrote:

Maxburg

unread,
Oct 5, 2014, 8:09:14 AM10/5/14
to kivy-...@googlegroups.com
Adding some screen dumps to clarify.



On Saturday, October 4, 2014 1:26:11 PM UTC+2, Maxburg wrote:

qua non

unread,
Oct 5, 2014, 9:22:01 AM10/5/14
to kivy-...@googlegroups.com
Hi Maxburg,

I recently did a presentation that has a tutorial for packaging using a VM and buildozer.

Tutorial- Virtual Machine(for packaging). Download Google Drive link

How to use the VM outlined here



Hope this helps you.
p.s
Just in case it's of interest.


--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Maxburg

unread,
Oct 5, 2014, 4:26:08 PM10/5/14
to kivy-...@googlegroups.com
Hi, qua-non,

Many thanks for the documents, it is very helpful and kind of you. Kivy indeed looks very promising.

Any ideas why the SDK Build Tools may be missing?



On Saturday, October 4, 2014 1:26:11 PM UTC+2, Maxburg wrote:

qua non

unread,
Oct 5, 2014, 11:50:52 PM10/5/14
to kivy-...@googlegroups.com
if you try out the VM I linked to, it has the sdk build told included.

--

Maxburg

unread,
Oct 7, 2014, 4:58:36 PM10/7/14
to kivy-...@googlegroups.com
Many thanks but I cannot unzip it. Says it the wrong size compared to original file. I have reinstalled everything and also updated the Python-for-Android but still gets this error when deploying;

# Android packages installation done.
# Check application requirements
# Check garden requirements
# Compile platform
# Distribution already compiled, pass.
# Build the application #4
# Package the application
# Command failed: /usr/bin/python2.7 build.py --name 'My Application' --version 1.2.0 --package org.test.myapp --private /home/kivy/apps/touchtracer/.buildozer/android/app --sdk 14 --minsdk 8 --orientation landscape debug


On Saturday, October 4, 2014 1:26:11 PM UTC+2, Maxburg wrote:

Roger Erens

unread,
Oct 8, 2014, 12:45:09 PM10/8/14
to kivy-...@googlegroups.com
Try the work-around described in this issue:

https://github.com/kivy/buildozer/issues/146

Op dinsdag 7 oktober 2014 22:58:36 UTC+2 schreef Maxburg:

Maxburg

unread,
Oct 8, 2014, 3:01:39 PM10/8/14
to kivy-...@googlegroups.com
Thank you but I can only find this:

This is what I did. Where did I go wrong or what do I need to do?  

   Download the disc image from http://kivy.org/#download

2.       Extract and remember the location of the extracted vdi file.

3.       Download the version of VirtualBox for your machine from the VirtualBox download area and install it.

4.       Start VirtualBox, click on “New” in the left top. Then select “linux” and “Ubuntu 32”.

5.       Under “Hard drive”, choose “Use an existing virtual hard drive file”. Search for your vdi file and select it.

6.       Go to the “Settings” for your virtual machine. In the “Display -> Video” section, increase video ram to 32mb or above. Enable 3d acceleration to improve the user experience.

7.       In VirtualBox terminal

git clone https://github.com/kivy/buildozer.git

cd buildozer

sudo python2.7 setup.py install


1.       In VirtualBox terminal my app folder

                   buildozer init


   In buildozer.spec

# (str) Application versioning (method 1)

# version.regex = __version__ = ['"](.*)['"]

# version.filename = %(source.dir)s/main.py

 

# (str) Application versioning (method 2)

version = 1.2.0

3.       And finally:

buildozer android debug deploy run

 

Roger Erens

unread,
Oct 8, 2014, 3:27:57 PM10/8/14
to kivy-...@googlegroups.com
So you created a directory somewhere containing the kivy app that you want to apk-ify (let's call it your project directory). Using the command line, you went into that directory and typed in the command 'buildozer debug deploy run', right? One of the effects of that command is to create hidden directories named .buildozer. One of those hidden directories got created in your project directory. But there's also one created in your $HOME directory. (~ is a shortcut for that).
Now there are a lot of directories created in that, some containing tools. One of the tools is by Google, start it up by entering this command:
~/.buildozer/android/platform/android-sdk-21/tools/android
Now you'll get a GUI as depicted in https://github.com/kivy/buildozer/issues/146. Follow the 4 remaining steps as outlined in the work-around.type0

When ready, re-type the buildozer command you typed in before.

Possibly another solution could be to uncomment the line
#android.sdk = 21
in your buildozer.spec file in your project directory, and replace the 21 by 20, before running your buildozer command.

Does that help you?

--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/h1ZbtvgTG6o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.

Maxburg

unread,
Oct 10, 2014, 2:04:37 PM10/10/14
to kivy-...@googlegroups.com
Roger, I can't thank you enough - after a week of trying, finally I have the app running on the phone . thanks to your bug fix :)

Roger Erens

unread,
Oct 15, 2014, 3:34:20 PM10/15/14
to kivy-...@googlegroups.com
Op vrijdag 10 oktober 2014 20:04:37 UTC+2 schreef Maxburg:
Roger, I can't thank you enough - after a week of trying, finally I have the app running on the phone . thanks to your bug fix :)

The solutions weren't mine, I was just echoing kived and inclement from #irc!
Reply all
Reply to author
Forward
0 new messages