Click here to Skip to main content
15,843,727 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using http://www.sqlite.org/c3ref/open.html as a reference for using the sqlite c for opening the db

i m calling like this
Java
package com.example.offline;

public class NativeLib {

static {
System.loadLibrary("sqlite3");
}

public native int sqlite3_open(String filename,Object sqlite3);

}




As documentation says
C++
int sqlite3_open(
const char *filename,   /* Database filename (UTF-8) */
sqlite3 **ppDb          /* OUT: SQLite db handle */
);


Error in logcat

12-12 14:49:15.645: W/dalvikvm(3265): No implementation found for native Lcom/example/offline/NativeLib;.sqlite3_open:(Ljava/lang/String;Ljava/lang/Object;)I


So my question is can we create sqlite c object in our java

Here is my Android.mk file

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := sqlite3
LOCAL_SRC_FILES := sqlite3.c
include $(BUILD_SHARED_LIBRARY)

Thanx guys
Posted
Updated 13-Dec-13 19:29pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900