Skip to content

Commit

Permalink
Update android ndk to r17c and update documentation
Browse files Browse the repository at this point in the history
We need to bump the version number for our ndk, otherwise we will get configure errors while building our python recipes with extra libraries. To avoid import errors for python3's ctypes module we must add an extra dependency to our docker file, the libffi-dev package.
  • Loading branch information
opacam committed Nov 22, 2018
1 parent 169a4da commit fcc0096
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV HOME_DIR="/home/${USER}"
ENV WORK_DIR="${HOME_DIR}" \
PATH="${HOME_DIR}/.local/bin:${PATH}"
# get the latest version from https://developer.android.com/ndk/downloads/index.html
ENV ANDROID_NDK_VERSION="16b"
ENV ANDROID_NDK_VERSION="17c"
# get the latest version from https://www.crystax.net/en/download
ENV CRYSTAX_NDK_VERSION="10.3.2"
# get the latest version from https://developer.android.com/studio/index.html
Expand Down Expand Up @@ -44,7 +44,7 @@ RUN apt update -qq && apt install -qq --yes --no-install-recommends \
RUN dpkg --add-architecture i386 && apt update -qq && apt install -qq --yes --no-install-recommends \
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 zip unzip zlib1g-dev zlib1g:i386
libffi-dev openjdk-8-jdk zip unzip zlib1g-dev zlib1g:i386

# specific recipes dependencies (e.g. libffi requires autoreconf binary)
RUN apt install -qq --yes --no-install-recommends \
Expand Down
29 changes: 26 additions & 3 deletions doc/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,34 @@ named ``tools``, and you will need to run extra commands to install
the SDK packages needed.

For Android NDK, note that modern releases will only work on a 64-bit
operating system. If you are using a 32-bit distribution (or hardware),
the latest useable NDK version is r10e, which can be downloaded here:
operating system. The minimal, and recommended, NDK version to use is r17c:

- `Linux (64-bits) <https://dl.google.com/android/repository/android-ndk-r17c-linux-x86_64.zip>`_
- `Macos X (64-bits) <https://dl.google.com/android/repository/android-ndk-r17c-darwin-x86_64.zip>`_
- Windows users should create a virtual machine with an GNU Linux os
installed, and then you can follow the described instructions from within
your virtual machine.

.. note::
Versions below r17 may cause troubles while compiling some recipes. Our
tests had been done against ndk versions r17b and r17c. Later versions of
the android ndk still are not proved to work with python-for-android, and
may work or not...so...better to stick to the recommended version (r17c).

If you are using a 32-bit distribution (or hardware),
the latest usable NDK version is r10e, which can be downloaded here:

- `Legacy 32-bit Linux NDK r10e <http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86.bin>`_

.. warning::
**32-bit distributions**

Since the python2 recipe updated to version 2.7.15, the build system has
been changed and you should use an old release of python-for-android, which
contains the legacy python recipe (v2.7.2). The last python-for-android
release with the legacy version of python is version
`0.6.0 <https://github.com/kivy/python-for-android/archive/0.6.0.zip>`_.

First, install a platform to target (you can also replace ``19`` with
a different platform number, this will be used again later)::

Expand All @@ -113,7 +136,7 @@ Then, you can edit your ``~/.bashrc`` or other favorite shell to include new env

# Adjust the paths!
export ANDROIDSDK="$HOME/Documents/android-sdk-21"
export ANDROIDNDK="$HOME/Documents/android-ndk-r10e"
export ANDROIDNDK="$HOME/Documents/android-ndk-r17c"
export ANDROIDAPI="26" # Target API version of your application
export NDKAPI="19" # Minimum supported API version of your application
export ANDROIDNDKVER="r10e" # Version of the NDK you installed
Expand Down

0 comments on commit fcc0096

Please sign in to comment.