I recently moved across to SQLite-net due to it supporting the new changes in Android 7.0 but it's bringing me major issues. I think it's related to linkers but not too sure how to handle the problem.
Firstly, if build my app in debug & release it works perfectly. No issues. If I then archive my app (Generate a signed APK) it starts to crash at different points depending on linker setting.
If I set my app to build with Sdk & user assemblies, my app instantly crashes. Here is part of the log:-
Caused by: android.runtime.JavaProxyThrowable: SQLite.SQLiteException: duplicate column name: objectId
at SQLite.SQLite3.Prepare2 (SQLitePCL.sqlite3 db, System.String query) [0x0001e] in <1096ddd2a2894a619279903f1fa07799>:0
at SQLite.SQLiteCommand.Prepare () [0x00011] in <1096ddd2a2894a619279903f1fa07799>:0
If I set my app to use Sdk's only it works a little different. It actually starts the app, downloads half of the data. If I try to update the data by adding more it crashes. The app will then crash upon starting everytime until I delete the entire local storage for that app which it then works perfectly.
I have read about skipping linking assemblies too in which case I have skipped all of the SQL related libraries.
--linkskip=SQLite-net --linkskip=SQLite.NET --linkskip=SQLite.Net.Platform.XamarinAndroid --linkskip=SQLite.Net.Platform.XamarinAndroidN --linkskip=SQLiteNetExtensions --linkskip=SQLitePCLRaw.batteries_green --linkskip=SQLitePCLRaw.batteries_v2 --linkskip=SQLitePCLRaw.core --linkskip=SQLitePCLRaw.lib.e_sqlite3 --linkskip=SQLitePCLRaw.provider.e_sqlite3
Has anyone got any ideas on how to fix this issue. I wanted to release an app shortly but can't get around this. Very similar things are happening with my iOS app too which run on the same DB.
Thanks in advance!