mirror of https://github.com/kivy/kivy.git
Tweaked apk build doc, and added buildozer section
This commit is contained in:
parent
663bb4bd88
commit
5fceff4452
|
@ -3,18 +3,22 @@
|
|||
Create a package for Android
|
||||
============================
|
||||
|
||||
|
||||
You can create a package for android using the `python-for-android
|
||||
<https://github.com/kivy/python-for-android>`_ project. This page explains how to
|
||||
download and use it directly on your own machine (see
|
||||
:ref:`Packaging your application into APK`), use the prebuilt :ref:`testdrive` virtual
|
||||
machine image, or use the :ref:`buildozer` tool to automate the entire
|
||||
process. You can also see :ref:`Packaging your application for Kivy Launcher` to run kivy
|
||||
programs without compiling them.
|
||||
|
||||
.. _Packaging your application into APK:
|
||||
|
||||
TestDrive
|
||||
---------
|
||||
|
||||
There is a VirtualBox Image we provide with the prerequisites along with
|
||||
the Android SDK and NDK preinstalled to ease your installation woes. You can
|
||||
download it from `here <http://kivy.org/#download>`_.
|
||||
|
||||
Packaging your application into an APK
|
||||
--------------------------------------
|
||||
|
||||
This section describes how to download and use python-for-android directly.
|
||||
|
||||
You'll need:
|
||||
|
||||
- A linux computer or virtual machine
|
||||
|
@ -128,6 +132,60 @@ http://developer.android.com/guide/publishing/app-signing.html
|
|||
The release binary will be generated in
|
||||
bin/KivyTouchtracer-1.1.0-release-unsigned.apk (for the previous touchtracer example.)
|
||||
|
||||
.. _testdrive:
|
||||
|
||||
TestDrive
|
||||
---------
|
||||
|
||||
We provide a VirtualBox Image with python-for-android along with
|
||||
the Android SDK and NDK preinstalled to ease your installation woes. You can
|
||||
download it from `here <http://kivy.org/#download>`_.
|
||||
|
||||
Once the VM is loaded, you can follow the instructions from
|
||||
:ref:`Packaging your application into APK`. You don't need to download
|
||||
with `git clone` though, as python-for-android is already installed
|
||||
and set up in the virtual machine home directory.
|
||||
|
||||
.. _Buildozer:
|
||||
|
||||
Buildozer
|
||||
---------
|
||||
|
||||
Buildozer is a tool that automates the entire build process. It
|
||||
downloads and sets up all the prequisites for python-for-android,
|
||||
including the android SDK and NDK, then builds an apk that can be
|
||||
automatically pushed to the device.
|
||||
|
||||
Buildozer currently works only in Linux, and is an alpha
|
||||
release, but it already works well and can significantly simplify the
|
||||
apk build.
|
||||
|
||||
You can get buildozer at `<https://github.com/kivy/buildozer>`_::
|
||||
|
||||
git clone https://github.com/kivy/buildozer.git
|
||||
cd buildozer
|
||||
sudo python2.7 setup.py install
|
||||
|
||||
This will install buildozer in your system. Afterwards, navigate to
|
||||
your project directory and run::
|
||||
|
||||
buildozer init
|
||||
|
||||
This creates a `buildozer.spec` file controlling your build
|
||||
configuration. You should edit it appropriately with your app name
|
||||
etc. You can set variables to control most or all of the parameters
|
||||
passed to python-for-android.
|
||||
|
||||
Afterwards, plug in your android device and run::
|
||||
|
||||
buildozer android debug deploy run
|
||||
|
||||
to build, push and automatically run the apk on your device.
|
||||
|
||||
You can check the buildozer README at
|
||||
`<https://github.com/kivy/buildozer>`_ for more documentation of
|
||||
buildozer's capabilities.
|
||||
|
||||
.. _Packaging your application for Kivy Launcher:
|
||||
|
||||
Packaging your application for the Kivy Launcher
|
||||
|
|
Loading…
Reference in New Issue