Does anyone know if it is possible to get Spatialite running on Android? Specifically for either Android 2.1 or 2.2.

I've been browsing the web, and although it seems technically possible, I haven't been able to find any procedures,tutorials,examples...etc to accomplish this. I'm new to Android development, so the simpler the instructions the better.

Any tips,comments,warnings welcome.

6 Answers 6


I couldn't say for Android but I've been able to do it for iOS.

The thing you need to consider is that spatialite requires native GEOS and PROJ4 libraries to work properly (for spatial indexes), so those ones also need to be compiled.

The version of sqlite required by spatialite may also be different from the one that is distributed in the platform (this is the case in iOS : the sqlite version is too old to be used directly by spatialite), that's why the right way to do it is to get the "amalgation" version of spatialite (that also encapsulate sqlite) and compile from that.


There is a short notice on the spatialite site with some info about how to build spatialite: http://www.gaia-gis.it/spatialite/how_to_build_libspatialite.html

For GEOS and PROJ4, you should be able to compile them from the scripts delivered with the project easily. However, on my side, even if the compilation went fine with the scripts, I had some side effects at runtime with double type (some were NaN), so I compiled them directly in XCode (the iOS dev env) and the runtime behavior was OK then.

  • 1
    Cool. Is this app in the App Store? Nov 26, 2011 at 18:09
  • Also, did you add GEOS? Nov 26, 2011 at 18:10
  • You should write a book yonel. I can't get enough of this hope you're promulgating, everybody else seems to believe this is nearly impossible Feb 24, 2014 at 2:00

Looks like someone has started some of the hard work already:


Going to have a look at the project and will provide some feedback over the next little while.


Its also worth noting:


There's an NDK build setup with SpatialSQLite



There is now a stable version of SpatiaLite for Android as announced by Sandro Furieri on the Google Group: https://groups.google.com/forum/?fromgroups=#!topic/spatialite-users/tnmc-sOK1PM

You may also want to check out Bill Dollin's blog post: http://blog.geomusings.com/2012/11/26/spatialite-for-android-available/


Speaking as a somewhat knowledgeable but not expert Android user - you would have to compile spatialite for Android. Remember your android phone is a headless linux machine so it would be possible but you would have to compile. I recommend looking at the NDK (the native dev kit for android (http://developer.android.com/sdk/ndk/index.html)

Hope that helps...


You should check out the Spatialite-Users Google Group if you haven't already. I found the following thread which may be of interest.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.