I m getting unsatisfied link error in native method
Logcat main exception
UnsatisfiedLinkError: Native method not found: rg.sqlite.database.sqlite.S
I have resolved this issue my self by adding
System.loadLibrary("sqliteX");
To each method where they are created
LIKE THIS:
public HashMap> word_quiz(String qry) {
System.loadLibrary("sqliteX");
ArrayList list1 = new ArrayList();
ArrayList list2 = new ArrayList();
SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(DB_PATH+ "/sk1.db", null);
Cursor mcursor = db.rawQuery(qry, null);
try {
mcursor.moveToFirst();
do {
list1.add(mcursor.getString(0));
list2.add(mcursor.getString(1));
} while (mcursor.moveToNext());
} catch (IndexOutOfBoundsException e) {
if (MainActivity.logcat_status) {
Log.e("Error", e + "");
}
}
mcursor.close();
mcursor = null;
HashMap> final_list = new HashMap>();
final_list.put("list1", list1);
final_list.put("list2", list2);
db.close();
return final_list;
}
Now its working fine
I think I can also use a constructor to load the library "sqliteX"
Thanks guys for considering my question :)