Opened 13 years ago

Last modified 12 years ago

#3952 closed enhancement

Android support — at Initial Version

Reported by: rolker Owned by: warmerdam
Priority: normal Milestone: 1.9.0
Component: default Version: svn-trunk
Severity: normal Keywords: android
Cc:

Description

I'm creating this ticket to collect patches and procedures for building GDAL for the Android platform.

Building GDAL using Android NDK

This procedure was developed on a Linux system using Android NDK r5b.

First, a standalone toolchain is created to make the configure script easier to use. (See android-ndk-r5b/docs/STANDALONE-TOOLCHAIN.html for more details)

~$ android-ndk-r5b/build/tools/make-standalone-toolchain.sh --platform=android-8 --install-dir=android-8-toolchain

Next, the toolchain's bin directory is added to the PATH.

~$ export PATH=$PATH:~/android-8-toolchain/bin/

From the GDAL source directory, configure for cross compiling and make.

gdal$ CC="arm-linux-androideabi-gcc" CXX="arm-linux-androideabi-g++" \
CFLAGS="-mthumb" CXXFLAGS="-mthumb" LIBS="-lsupc++ -lstdc++"  ./configure --host=arm-linux-eabi --without-grib
gdal$ make

Next steps

  • check if resulting libs are usable.
  • build and adapt the Java swig bindings to expose GDAL to the Java portion of an Android application.

Change History (1)

by rolker, 13 years ago

Attachment: android.diff added

Small patch to allow building with Android NDK

Note: See TracTickets for help on using tickets.