Skip to content

Commit fcc0096

Browse files
committed
Update android ndk to r17c and update documentation
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.
1 parent 169a4da commit fcc0096

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ENV HOME_DIR="/home/${USER}"
1515
ENV WORK_DIR="${HOME_DIR}" \
1616
PATH="${HOME_DIR}/.local/bin:${PATH}"
1717
# get the latest version from https://developer.android.com/ndk/downloads/index.html
18-
ENV ANDROID_NDK_VERSION="16b"
18+
ENV ANDROID_NDK_VERSION="17c"
1919
# get the latest version from https://www.crystax.net/en/download
2020
ENV CRYSTAX_NDK_VERSION="10.3.2"
2121
# get the latest version from https://developer.android.com/studio/index.html
@@ -44,7 +44,7 @@ RUN apt update -qq && apt install -qq --yes --no-install-recommends \
4444
RUN dpkg --add-architecture i386 && apt update -qq && apt install -qq --yes --no-install-recommends \
4545
build-essential ccache git libncurses5:i386 libstdc++6:i386 libgtk2.0-0:i386 \
4646
libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 libidn11:i386 python2.7 python2.7-dev \
47-
openjdk-8-jdk zip unzip zlib1g-dev zlib1g:i386
47+
libffi-dev openjdk-8-jdk zip unzip zlib1g-dev zlib1g:i386
4848

4949
# specific recipes dependencies (e.g. libffi requires autoreconf binary)
5050
RUN apt install -qq --yes --no-install-recommends \

doc/source/quickstart.rst

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,34 @@ named ``tools``, and you will need to run extra commands to install
9393
the SDK packages needed.
9494

9595
For Android NDK, note that modern releases will only work on a 64-bit
96-
operating system. If you are using a 32-bit distribution (or hardware),
97-
the latest useable NDK version is r10e, which can be downloaded here:
96+
operating system. The minimal, and recommended, NDK version to use is r17c:
97+
98+
- `Linux (64-bits) <https://dl.google.com/android/repository/android-ndk-r17c-linux-x86_64.zip>`_
99+
- `Macos X (64-bits) <https://dl.google.com/android/repository/android-ndk-r17c-darwin-x86_64.zip>`_
100+
- Windows users should create a virtual machine with an GNU Linux os
101+
installed, and then you can follow the described instructions from within
102+
your virtual machine.
103+
104+
.. note::
105+
Versions below r17 may cause troubles while compiling some recipes. Our
106+
tests had been done against ndk versions r17b and r17c. Later versions of
107+
the android ndk still are not proved to work with python-for-android, and
108+
may work or not...so...better to stick to the recommended version (r17c).
109+
110+
If you are using a 32-bit distribution (or hardware),
111+
the latest usable NDK version is r10e, which can be downloaded here:
98112

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

115+
.. warning::
116+
**32-bit distributions**
117+
118+
Since the python2 recipe updated to version 2.7.15, the build system has
119+
been changed and you should use an old release of python-for-android, which
120+
contains the legacy python recipe (v2.7.2). The last python-for-android
121+
release with the legacy version of python is version
122+
`0.6.0 <https://github.com/kivy/python-for-android/archive/0.6.0.zip>`_.
123+
101124
First, install a platform to target (you can also replace ``19`` with
102125
a different platform number, this will be used again later)::
103126

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

114137
# Adjust the paths!
115138
export ANDROIDSDK="$HOME/Documents/android-sdk-21"
116-
export ANDROIDNDK="$HOME/Documents/android-ndk-r10e"
139+
export ANDROIDNDK="$HOME/Documents/android-ndk-r17c"
117140
export ANDROIDAPI="26" # Target API version of your application
118141
export NDKAPI="19" # Minimum supported API version of your application
119142
export ANDROIDNDKVER="r10e" # Version of the NDK you installed

0 commit comments

Comments
 (0)