No implementation found for void jsqlite.Database.internal_init

859 views
Skip to first unread message

Jean-Yves Hallé

unread,
May 14, 2018, 10:08:55 AM5/14/18
to SpatiaLite Users
I am trying to run SpatiaLite on Android by doing what the tutorial is showing there (in the Open a database section):
https://www.gaia-gis.it/fossil/libspatialite/wiki?name=spatialite-android-tutorial

But I get an error on the line:
    db = new jsqlite.Database();

The error is:
Caused by: java.lang.UnsatisfiedLinkError: No implementation found for void jsqlite.Database.internal_init() (tried Java_jsqlite_Database_internal_1init and Java_jsqlite_Database_internal_1init__)
at jsqlite.Database.internal_init(Native Method)
at jsqlite.Database.<clinit>(Database.java:956)
at sygif.testspatialite2.MainActivity.HelloOnClick(MainActivity.java:23)
at java.lang.reflect.Method.invoke(Native Method) 
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:384) 
at android.view.View.performClick(View.java:6579) 
at android.view.View.performClickInternal(View.java:6556) 
at android.view.View.access$3100(View.java:777) 
at android.view.View$PerformClick.run(View.java:25660) 
at android.os.Handler.handleCallback(Handler.java:819) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:164) 
at android.app.ActivityThread.main(ActivityThread.java:6656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)

It seems to be the same than this post:
https://groups.google.com/forum/#!topic/spatialite-users/pPf7H1SsH08

But I tried to change the sdk version and nothing changes. I don't understand why the code compile but I get this error. The code should not compile?

Jean-Yves Hallé

unread,
May 14, 2018, 2:20:46 PM5/14/18
to SpatiaLite Users
I found that the SO files from Jsqlite were not included in my project (they were not in the right folder). I had to put them in src\main\jniLibs and now it works.
Reply all
Reply to author
Forward
0 new messages