Search code examples
androidunity-game-enginesqliterooted-device

Error on rooted android phones: message:DllNotFoundException: sqlite3


I have a Unity app which runs great on iOS and Android phones but on rooted nexus phones I get this error.

device:Nexus 4, engine_version:unity 5.2.2, jailbroken:true, manufacturer:LGE, message:DllNotFoundException: sqlite3

Since the app works on other android phones I believe the problem lies in the fact that the phone is rooted. Any ideas on how to fix this would be appreciated.


Solution

  • Do you really think that root is main cause? Have you added sqlite libraries by yourself to Unity project (Mono.Data.Sqlite.dll, sqlite3.dll, System.Data.dll)?

    I also found something like this on Unity forums:

    The problem is solved this way: besides Mono.Data.Sqlite.dll, sqlite3.dll and System.Data.dll it is necessary to use library libsqlite3.so. Pay attention that for ARM and x86 you need different libraries. To use the needed library version, depending on type of device (ARM or x86), it is necessary to create the folder "Android" in the folder "Plugins", folder "libs" in "Android", "armeabi-v7a" and "x86" in folder "libs", in which you shoud place the corresponding versions the libraries. Like this: enter image description here

    You can download the version of the library for the x86 here and for ARM here.

    Src: http://answers.unity3d.com/questions/872068/dllnotfoundexception-sqlite3.html