- Home /
Sqlite3.dll not found on specific Android devices
When trying to read a sqlite database on Android devices we received the following error:
DllNotFoundException: sqlite3.dll We researched the problem and found a solution here:Unable to find sqlite3.dll
http://forum.unity3d.com/threads/97043-Sqlite-for-Android-help-please?p=686204#13
The solution involves putting a file called libsqlite3.so in Plugins/Android/
This fixed the problem on some Android devices but not others. Specifically, we are now able to read the database on a Nexus 7, but not on a Kindle Fire HD.
The error message when running on Kindle Fire HD is the same (dll not found) as before.
Has anyone else had a similar problem where sqlite3.dll can be found only on specific Android devices?
Hey,
Did you ever find a solution to this? Currently having the same problem between Nexus 5/Galaxy Tab and it's driving me utterly mad!!!
Dave.
Hi, any updates? I have the same problem wit Galaxy Tab 3(
Answer by $$anonymous$$ · Mar 30, 2016 at 08:23 AM
Hi; all you have to do is download "C source code as an amalgamation" from http://sqlite.org/download.html.
Easiest way to compile is Visual Studio Community Edition (2015). Download it. Install cross platform extension too. It will download Android NDK tools, etc. In Visual Studio create a shared android dynamic library project and add "sqlite.c", "sqlite.h", "sqlite3ext.h" to project (leaving client code out.).
From project settings disable pre-headers. Set optimization for size. And compile for x86 and arm.
You will have to so files; place them under:
/Assets/Plugins/Android/libs/armeabi-v7a
/Assets/Plugins/Android/libs/x86
It is best to compile yourself to be sure code does not have extra modification. However; I am adding files I have compiled for myself. You can find files attached and try if it works for you.
Hi! Are these different from these: https://github.com/codecoding/SQLite4Unity3d? I'm asking as I'm having no luck with SQLite4Unity3d on my N7 (2013).
@Strangerweather - I am stuck with the same problem. Did you got any solution?
Hi @vanshika1012, is your problem with setting up SQLite4Unity3d? If so, yes, I eventually sorted it out with a lot of help from a very kind soul. Let me know. If it's SQLite4Unity3d you might want to post a new question as it is OT here. I'll try and help.
This helped for me. Thanks so you much. I don't understand it, but now it works :D
I spent so much time looking for why I couldn't access my database and just adding the two .so files in my Assets made it working. Thanks a lot !
This worked on my device that was running Android 7.0, but now after i updated it to Oreo, it is not working anymore.
Any help regarding this, please?
@Nandagopal92 Same here, doesn't work on Android 8.0. I sure as sh*t ain't an expert, but perhaps it has to do arm64-v8a in this documentation? Tested on a OP5T. I'm going to try to compile it for that architecture (following $$anonymous$$aan-Yy guide) and place it in the according folder, see if that helps.
Never$$anonymous$$d and it also seems to work when I compiled the library myself for x86 and AR$$anonymous$$
@JoeriVDE Can you share us this Library please ? I Don't understand at all how to compile "C sourde code as an amalgamation" files into a .so under VS2017
Answer by Bonobo · Dec 08, 2014 at 09:49 AM
Unfortunately not. We changed the way that we were getting data (now we're parsing downloaded JSON) so I never had time to solve the issue before we had to move on.
Your answer
Follow this Question
Related Questions
SQLite Transaction Update Problem on Android 0 Answers
SqlLite , android and unity 1 Answer
Unity sqlite to android: no such table 0 Answers