Reputation: 8970
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:
Upvotes: 5
Views: 19193
Reputation: 230
Check out this video by Erik Sandberg as he explains it really well. Then you will need to go into the bin
directory to find your compiled APK. Let me know by adding a comment if this doesn't work.
Upvotes: 1
Reputation: 46291
Buildozer itself doesn't depend on any library, and works on Python 2.7 and >= 3.3. Depending on the platform you want to target, you might need more tools installed.
Buildozer tries to give you hints or tries to install few things for you, but it doesn't cover every situation.
The official documentation covers more but here is how to do it in Ubuntu 16.04 64-bit:
sudo pip install --upgrade cython==0.21
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install build-essential ccache git libncurses5:i386 libstdc++6:i386 libgtk2.0-0:i386 libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 libidn11:i386 python2.7 python2.7-dev openjdk-8-jdk unzip zlib1g-dev zlib1g:i386
Upvotes: 0
Reputation: 8970
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
Upvotes: 4
Reputation: 1072
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
Upvotes: 2