I am trying to get sqlite working on Android. I have a Mobile license for Android and I am developing on a Macbook Pro. Here is my plan of attack:
The only problem is I am self trained in computer and compiling is not exactly my strong point. I once compiled a shared library using Android NDK and thought this would be similar. Not at all. And the plugin example from Unity site (the one with the texture) came with the DLL already made so it doesn't help.
Could someone post a detailed direction on how to accomplish this. Or, if you have a better solution, please do share.
Some forum user kindly posted a Shared Object Library version of the sqlite3.dll, so it can work on Android. Here : http://forum.unity3d.com/threads/97043-Sqlite-for-Android-help-please?p=686204#13
Solved everything for me.
answered Sep 12 '11 at 11:47 AM
OK, correct me if I am wrong. Mono allows linux-based systems to run dll files?
I am following the example from http://www.unifycommunity.com/wiki/index.php?title=SQLite It works in the editor and on Mac standalone, but it does not work for Android.
After unzipping the apk file, I see a Mono.Data.Sqlite.dll file under the Managed/ folder. When I tried to create a database through my app on a Droid, I got the following error from ddms:
07-15 13:27:33.550: INFO/Unity(31157): DllNotFoundException: sqlite3 07-15 13:27:33.550: INFO/Unity(31157): at (wrapper managed-to-native) Mono.Data.Sqlite.UnsafeNativeMethods:sqlite3open v2 (byte,intptr&,int,intptr) 07-15 13:27:33.550: INFO/Unity(31157): at Mono.Data.Sqlite.SQLite3.Open (System.String strFilename, SQLiteOpenFlagsEnum flags, Int32 maxPoolSize, Boolean usePool) [0x00000] in :0 07-15 13:27:33.550: INFO/Unity(31157): at Mono.Data.Sqlite.SqliteConnection.Open () [0x00000] in :0
Could anyone tell me what is going on?
answered Jul 15 '11 at 09:40 PM