|
Hello, 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. Jason
(comments are locked)
|
|
Please, check this -> http://u3d.as/content/orange-tree/sqlite-kit/3ka That is 100% managed code, full SQLite3 support, all platforms. No native dependencies.
(comments are locked)
|
|
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.
(comments are locked)
|
|
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? @rambramdt: No. Mono doesn't allow you to run native windows dll files on linux. However pure managed code libraries (also the extension .dll) will run with Mono on any supported platform. The Mono.Data.Sqlite.dll is a mixedmode .NET assembly. While it is a managed code library it's just a wrapper to the native code dll SQLite3.dll You might want to try this 100% managed code port of sqlite
Mar 26 '12 at 12:00 PM
Bunny83
I think you have to look at http://u3d.as/content/orange-tree/sqlite-kit/3ka
Sep 11 '12 at 03:56 AM
Oksana Iashchuk
(comments are locked)
|
|
I wish to hell I could down vote this answer. definitely not helpful in the least.
(comments are locked)
|

All right. I found a http://libsqlite.so and extracted it from my Droid phone using ADB. So, now I do not have to cross compile, thank God!
However, if there is already a http://libsqlite.so in the phone, why doesn't SQLite work? I tried to adjust the Android API level and the .NET compatibility in the player settings. Didn't help.
I know I am getting closer, but if somebody could help, I'll appreciate it deeply.
Jason
You could get the same result, just adding System.Data.dll and Mono.Data.Sqlite.dll to Assets/Plugins folder. The problem you have is your droid didn't find sqlite3.dll. I have the same problem and I don't know how to deal with it.
bump
I have the exact same issue, and I have been unable to get around it. Please someone help us! it cannot be this hard to implement a sqlite database, Also, how will this effect us if we are developing for android & IOS?
please someone help.
Bump, same problem here ... sqlite3.dll won't be integrated into the Android build, for whatever reason. So how are we supposed to use Sqlite for Android ? (reminder : Android natively supports Sqlite, so it should be a supported feature) Bug reported under case 417539)
Update:
This is a MonoDroid issue. Contact them to get it fixed. In the mean time, consider Siaqodb. It is an object database with Unity support, reasonably priced. Their technical support has been highly responsive and helpful.
Jason