java.lang.UnsatisfiedLinkError in jsqlite.Database.internal_init in Android Spatialite

允我心安 提交于 2019-12-01 18:47:13

I solved it by setting in the app built.gradle (or in the AndroidManifest.xml) this:

targetSdkVersion 21

And it works! I know that it isn't a good solution, it's a patch, but i works!

***UPDATE

If you can't change the target version to 21, you can do the following:

  • Download the source code from:https://github.com/geopaparazzi/geopaparazzi
  • Clean all references in your project to spatialite, .war file, and jndi libraries
  • Copy module geopaparazzispatialitelibrary and integrate in your project
  • Clean the code that you don't need from the module
  • Compile, and enjoy your project targeting version 23

It's a bit complex process, but it works.

Expecially thanks to andrea antonello, he help me to solve the problem, and do a great job with spatialite.

In case this can help anyone with the same problem, I solved this by updating the jni libraries. To do this i downloaded this file:

https://github.com/geopaparazzi/libjsqlite-spatialite-android/blob/master/archive/20150616.libjsqlite.4.3.0.tar.bz2

from the geopaparazzi github repo which contains the latest version of the jni libraries as of now.

Replace the .so files in the spatialiteandroid library with the ones in the archive file.

You can find all versions of the library here: https://github.com/geopaparazzi/libjsqlite-spatialite-android/tree/master/archive:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!