cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot create ultralitej database in adnroid 5.0 or later

Former Member
0 Kudos
2,607

Hello, i have an application that was working fine till a customer upgraded his tablet to Android 5.0. The database was stored on the SD Card, but after the upgrade there is no access to it. I am trying to create the database on the default ultralite database location but with no success. Any help will be appreciated

string exStorageDir = Android.OS.Environment.ExternalStorageDirectory.AbsolutePath;
dbLocation = System.IO.Path.Combine(exStorageDir, DatabaseName);
IConnection dBConnection = null;
IConfigPersistent Config = DatabaseManager.CreateConfigurationFileAndroid(dbLocation,ctx);
Config.CreationString = "collation=1253ELL;";
dBConnection = DatabaseManager.CreateDatabase(Config);

Object reference not set to an instance of an object at RetailMobile.Sync.GenerateDatabase (Android.Content.Context ctx) [0x002c3] in d:\\Projects\\RetailMobile\\RetailMobile\\Sync.cs:413 at RetailMobile.Main.OnCreate (Android.OS.Bundle bundle) [0x0011e] in d:\\Projects\\RetailMobile\\RetailMobile\\Main.cs:132

I tried with any other directory, not only external dir - files path dir, root dir, but always the same.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Thanks Andy, I found what was causing the problem. The folder that "libultralitej12.so" should be in, must have the same name as the device’s architecture. So if you want to support different architectures you should put the file in all folders - "armeabi", "armeabi-v7a", "x86"... 🙂

Former Member

Good, but FYI: libultralitej12.so is a native library built for ARM architectures and so will not work on x86. X86 support will be available in SQLA 17.0.

Answers (0)