It's not easy to install buildozer on Ubuntu 13.10. I reinstalled Ubuntu several times and now I'd like to share how I installed buildozer.
I got the following errors from buildozer:
I've installed it in a fresh installation of Ubuntu 13.10 (32bit) inside a virtual machine (VMware player) in Windows 7 (64bit) host system.
I decided to use 32 bit because the VM uses not that much RAM and a 64bit system is not needed. But 64bit Ubuntu will probably also work (not tested). I uploaded the zip archive of the VMWare files to google drive (password in ubuntu for root user alexander is UbuntuBuildozer)
You can find the zip-file here: https://drive.google.com/file/d/0B5m9_RVHCpL-YmxPVnVaYWZyZ2s/edit?usp=sharing
install Python-Kivy (http://kivy.org/docs/installation/installation-linux.html#ubuntu-11-10-or-newer) with
$ sudo add-apt-repository ppa:kivy-team/kivy
$ sudo apt-get update
$ sudo apt-get install python-kivy
install pip, if you haven't got it:
$ sudo apt-get install python-pip python-dev build-essential
prerequisites for buildozer: zlib, Git, Cython and JDK is required
$ sudo apt-get install zlib1g-dev git-core cython openjdk-7-jdk
install Java JDK guide (http://tecadmin.net/install-java-jdk-ubuntu/#)
install buildozer (https://github.com/kivy/buildozer)
$ sudo pip install buildozer
initialize buildozer and start with debug (just to install Andriod SDK, NDK & ANT - no main.py needed yet, this takes several minutes):
$ buildozer init
$ buildozer android debug
If buildozer fails at _add_java_src(): Add JDK path in /home/yourusername/.bashrc - add these lines at the end (important use 1.x JDK and not java-7 path):
export PATH=$PATH:/usr/lib/jvm/java-1.6.0-openjdk-i386/bin
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-i386
Now go to your apps main.py and do the following commands:
$ buildozer init
(edit buildozer.spec and change your app name and check the versioning on line 28/29 or line 32 --> depends on your main.py code
see SO answer to Buildozer compiles simple android kivy application, but fails while packaging)$ buildozer android debug deploy run
Note that you don't actually need Kivy if all you want to do is compile APKs. I use the following script to install only Buildozer on Ubuntu 13.10 64bit.
#!/bin/sh
# Install necessary system packages
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y build-essential git zlib1g-dev python2.7 python2.7-dev libncurses5:i386 libstdc++6:i386 zlib1g:i386 openjdk-7-jdk unzip
# Bootstrap a current Python environment
sudo apt-get remove --purge -y python-virtualenv python-pip python-setuptools
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python2.7
rm setuptools*.zip
sudo easy_install-2.7 -U pip
sudo pip2.7 install -U virtualenv
# Install current version of Cython
sudo apt-get remove --purge -y cython
sudo pip2.7 install -U cython
# Install Buildozer from master
sudo pip2.7 install -U git+https://github.com/kivy/buildozer.git@master
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With