Wednesday 15 June 2011

java - Taking an example app and adding SQLCipher not working -


I'm currently following with Mark Murphys's SQLite Android tutorial. I stumbled on SQLCihper and it has pulled off a device when I have the ability to make data unreadable. I have created my own sample app, and DB and main activity work perfectly. I am able to drag the database from the emulator and I am able to read the contents using the database. I then follow these "simple" instructions from another question, but I am getting errors.

My creation in my dream app is my creation:

  super.onCreate savedInstanceState); SetContentView (R.layout.main); DBHloper DB = new DBHlper (this); Db.getReadableDatabase ();   

Then, the above code works fine.

Next I tried to integrate my sample application with SQLCipher:

  1. icudt46l copied
  2. copied all three . Then the files have been copied in / or in Arabic.
  3. This file is copied in / x86
  4. copied to three jars / libs
  5. from SQLcaper To use API, changed its import to its DBHlper class
  6. Added a parameter to readableDatabase ();

    So now my MainActivity onCreate code looks like this:

      super.onCreate (saved instancestate); SetContentView (R.layout.main); DBHloper DB = new DBHlper (this); Db.getReadableDatabase ("sekrit");   

    Login:

      06-20 20: 50: 33.178: E / Android Random (24805): Fatal Exception: Key 06-20 20:50 : 33.178: E / AndroidRuntime (24805): java.lang.UnsatisfiedLinkError: Basic method not found: net.sqlcipher.database.SQLiteDatabase.dbopen: (Ljava / Lang / string, I) V 06-20 20: 50: 33.178: E / AndroidRuntime (24805): 50: 33.178: E / AndroidRuntime (24805): net.sqlcipher.database.SQLiteDatabase.dbopen (Native Method) 06-20 at 20. Net.sqlcipher.database.SQLiteDatabase & lt; Init & gt; (SQLiteDatabase.java.1950) 06-20 20: 50: 33.178: E / Android Time (24805): Seconds on the Net Database SQLiteDatabase.openDatabase (SQLiteDatabase.java:900) 06-20 20: 50: 33.178: E / AndroidRuntime (24,805): to net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase (SQLiteDatabase.java:943) 06-20 20: 50: 33.178: E / AndroidRuntime (24805): net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase at (SQLiteOpenHelper.java:107) 06-20 20: 50: 33.178: E / Android Time (24805): On the Net. 06 on Sqlcipher.database.SQLiteOpenHelper.getRead ableDatabase (SQLiteOpenHelper.java:173) 06-20 20: 50: 33.178: E / AndroidRuntime (24,805): com.example.testsqlcipher.MainActivity.onCreate (MainActivity.java:65) 20 20: 50: 33.178: E / AndroidRuntime (24805): android.app.Activity.performCreate (Activity.javaitter104) 06-20 20: 50: 33.178: E / AndroidRuntime (24805): android.app.Instrumentation .callActivityOnCreate (Instrumentation.java: 1080) 06-20 20: 50: 33.178: E / Android Rendime (24805): Android. App Aktivtitredkprform lock activity (Gtividhitred. Java 40014) 06-20 20: 50: 33.178: E / Androidrentaim (24805): 50: 33.178: android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2230) 06-20 20 E / AndroidRuntime (24805): android.app.ActivityThread.access $ 600 (ActivityThread.java:141) 06-20 20: 50: 33.178: E / Android Random (24805): Android. App ActiveTrade $ H Holland Message (ActivityTrad.Java 1234) 06-20 20: 50: 33.178: E / Android Time (24805): Android. Handseller Disappechmail (Handler. Java: 99) 06-20 20: 50: 33.178: E / Android Time (24805): At android.os.Looper.loop (Looper.java:137) 06-20 20: 50: 33.178: e / Androidrentaim (24805): Android.ap.aktivtitredkmain (Gtividhitredkxavaadit 41) 06 20 20: 50: 33.178: e / Android Rentaim (24,805) (Basic Law on java.lang.reflect.Method.invokeNative ) 06-20 20: 50: 33.178: E / Android TimeTime (24805): java.lang.reflect Method.vive.invoke (Method.java: 1111) 06-20 20: 50: 33.178: E / Androidrentaim (24805): com.android.internal.os.ZygoteInit at $ MethodAndArgsCaller.run (ZygoteInit.java:793) 06 - 20 20: 50: 33.178: e / Android Rentaim (24,805) on ComkandroidkinternalkoskZygoteInitkmain (Jhigoteinitkjawa presentation 60) 06-20 20: 50: 33.178: e / Androidrentaim (24805) : Dalvik.system.NativeStart.main (the original method)    

    It seems that You guys meet it in response to all questions, but for reference and for anyone else, we have the SQLCipher and the Android Projects available here Integration tutorial Finalists, which is loaded Lib bit; -)

    As @ com, Monsters suggests, everyone is welcome to post questions in the mailing list of SQLCipher users:



No comments:

Post a Comment