UnsatisfiedLinkError in native method

前端 未结 3 716
[愿得一人]
[愿得一人] 2020-12-16 06:58

I m getting unsatisfied link error in native method

Logcat main exception

UnsatisfiedLinkError: Native method not found: rg.sqlite.database.sqlite.S         


        
3条回答
  •  独厮守ぢ
    2020-12-16 07:34

    The exception originates from your code at com.example.samplesqlitedb.MainActivity$2.onClick() at com/example/samplesqlitedb/MainActivity.java:56, but System.loadLibrary() is called from org.sqlite.app.customsqlite.CustomSqlite.run_the_tests(). There is no evidence that the org.sqlite.app.customsqlite.CustomSqlite activity was even loaded into JVM when this happened.

    I would suggest to load libsqliteX.so from the static constructor of org.sqlite.database.sqlite.SQLiteConnection class. Maybe you can find some better place - e.g. com.example.samplesqlitedb.SearchDataDB class, or the class in your app that extends android.app.Application (if you have such).

提交回复
热议问题