oysteinkrog / SQLite.Net-PCL

Simple, powerful, cross-platform SQLite client and ORM - Updated version with PCL support
MIT License
353 stars 162 forks source link

Cause crashes when compiling with Android N #365

Open devinZhou102 opened 7 years ago

devinZhou102 commented 7 years ago

detected problems with app native libraries unauthorized access to "/system/lib/libsqlite.so"

minafaw commented 7 years ago

I have the same issue any one can guide me to fix the issue


Xamarin caused by: android.runtime.JavaProxyThrowable: System.DllNotFoundException: /system/lib64/libsqlite.so
SQLite.Net.Platform.XamarinAndroid.SQLiteApiAndroidInternal.sqlite3_open_v2(byte[], ref intptr, int, intptr)(wrapper managed-to-native)
SQLite.Net.Platform.XamarinAndroid.SQLiteApiAndroid.Open(byte[] filename, ref IDbHandle db, int flags, IntPtr zvfs)<8dbf6ff85082469fb9d4dfaa9eae6b69>:0
SQLite.Net.SQLiteConnection.SQLiteConnection(ISQLitePlatform sqlitePlatform, string databasePath, SQLiteOpenFlags openFlags, bool storeDateTimeAsTicks, IBlobSerializer serializer, IDictionary<TKey, TValue> tableMappings, IDictionary<TKey, TValue> extraTypeMappings, IContractResolver resolver)<8f2bb39aeff94a30a8628064be9c7efe>:0
SQLite.Net.SQLiteConnection.SQLiteConnection(ISQLitePlatform sqlitePlatform, string databasePath, bool storeDateTimeAsTicks, IBlobSerializer serializer, IDictionary<TKey, TValue> tableMappings, IDictionary<TKey, TValue> extraTypeMappings, IContractResolver resolver)<8f2bb39aeff94a30a8628064be9c7efe>:0
CrewBriefingForms.Droid.CrewBriefingDB_Android.GetConnection()
CrewBriefingForms.Database.DB_PCL.DropDatabase()
CrewBriefingForms.LoginPage.<buttonDemo_Click>d__4.MoveNext()
Android.App.SyncContext.<>c__DisplayClass2_0.<Post>b__0()<d855bac285f44dda8a0d8510b679b1e2>:0
Java.Lang.Thread.RunnableImplementor.Run()<d855bac285f44dda8a0d8510b679b1e2>:0
Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this)<d855bac285f44dda8a0d8510b679b1e2>:0
at (wrapper dynamic-method) System.Object:ec3bbe43-9dc1-42c7-a62e-de6cd3baa963 (intptr,intptr)
mono.java.lang.RunnableImplementor.n_run(Native Method)
mono.java.lang.RunnableImplementor.run()RunnableImplementor.java:30
android.os.Handler.handleCallback()Handler.java:751
android.os.Handler.dispatchMessage()Handler.java:95
android.os.Looper.loop()Looper.java:154
android.app.ActivityThread.main()ActivityThread.java:6682
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:1520
com.android.internal.os.ZygoteInit.main()ZygoteInit.java:1410
anjalirawat11 commented 7 years ago

I am getting the same error when compiling with android 7.0 or greater. Is there any solution?

srmagura commented 7 years ago

You can solve it with this NuGet package: https://www.nuget.org/packages/SQLite.Net.Platform.XamarinAndroidN/

gsgou commented 7 years ago

Thanks @srmagura for mentioning this!

ravikanasagra1 commented 6 years ago

I have also received this error. Do you guys have this handled. Shall I switch to another plugin?

gsgou commented 6 years ago

@ravikanasagra1 just use https://github.com/praeclarum/sqlite-net.