0

I want to set up a local database for my Unity-based application. Up to now, I have followed this tutorial post to setup all things: SQLite and Unity: How to do it right

Within my Unity Editor, all things working properly without any problem but when I execute the game build within Android device, it was giving me this kind of error message:

enter image description here

With a similar error message, I read many posts and tried different approaches but nothing worked for me so I have decided to post the question here.

At present, this kind of setup I have for sqlite3: enter image description here

To give me some suggestion still if you require some details then let me know.

EDIT: .so file inspector detail enter image description here

Siddharth
  • 4,142
  • 9
  • 44
  • 90
  • The main problem seems to be that the sqlite3 plugin dll is not deployed to the standalone app to the device. I have not worked with plugins for android yet, but Android is not included according to your import settings. Look in the android libs and include the dll for standalone build. Look on SO or google, if anyone has tried to use plugins on android and how to do it – hoffmanuel Jun 23 '20 at 14:45
  • Within armeabi-v7a and x86 folders, there are libsqlite3.so files exist - this I want to inform you – Siddharth Jun 23 '20 at 14:50
  • Maybe you find some information here https://docs.unity3d.com/Manual/AndroidNativePlugins.html – hoffmanuel Jun 23 '20 at 14:55
  • It might be that you have to wrap around the .so plugin code in an extra class or add architecture dependent code – hoffmanuel Jun 23 '20 at 15:08

1 Answers1

0

According to the information provided and the information from you, I would suggest that the .so plugin file just needs to have Android selected. You may have to manually add the methods according to the information in

https://docs.unity3d.com/Manual/AndroidNativePlugins.html

I hope that helps

hoffmanuel
  • 403
  • 1
  • 5
  • 14
  • I have already done this with so files already and added more details in the question. – Siddharth Jun 23 '20 at 15:08
  • Ok, any improvement of your situation? You may have to wrap the functions in libsqlite3.so in an extra class – hoffmanuel Jun 23 '20 at 15:10
  • You may have to do a lot of "[DllImport ("pluginName")] private static extern float Foopluginmethod();" declarations by yourself if there is no C# / Mono wrapper for the libsqlite3 – hoffmanuel Jun 23 '20 at 15:12
  • Maybe you can find information here https://forum.unity.com/threads/simplesql-sqlite-integration-with-unity3d.143442/page-12#post-4551331 – hoffmanuel Jun 23 '20 at 15:20
  • Or try the answer here https://stackoverflow.com/questions/50753569/setup-database-sqlite-for-unity – hoffmanuel Jun 23 '20 at 15:24