SQLite.Net.Standard is not working in Android 8 in Xamarin Forms.
What is the alternative ?
I installed SQLIte.Net.Standard but found i was getting "Unhandled Exception: System.DllNotFoundException: /system/lib/libsqlite.so occurred" at runtime.
Further reading indicated that starting with Android 7, access to this lib was removed or restricted. Supposedly the fix was using a different Nuget package.
SQLite.Net.Platform.XamarinAndroidN
I use the alternative NuGet Package sqlite-net from praeclarum with Android 8 + 9 devices and had no problems so far.
Usage:
var db = new SQLiteConnection(Path.Combine(dbPath, dbFile));
db.CreateTable<YourModel>();
var yourObject = new YourModel();
db.Insert(yourObject);
Related
No matter which package I tried to install when running on iOS simulator get an error the same no matter which package.
fatal error: module 'name of the module I'm trying' not found
Is a new MacBook Air, so I can't emulate Android to see if is the same.
Been days stuck here
This is the output:
Failed to build iOS app Error output from Xcode build: ↳
objc[94975]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x1faf938f0) and ?? (0x11acac2b8). One of the two will be
used. Which one is undefined.
objc[94975]: Class AMSupportURLSession is implemented in both ?? (0x1faf93940) and ?? (0x11acac308). One of the two will be used. Which
one is undefined.
** BUILD FAILED **
Xcode's output: ↳
/Users/rafy/Desktop/Flutter_App_with_Android_Studio/cte_baberia/ios/Runner/GeneratedPluginRegistrant.m:10:9:
fatal error: module 'firebase_auth' not found
#import firebase_auth;
~~~~~~~^~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To
resolve this, select a development team in the Runner editor. (in
target 'Runner' from project 'Runner')
Could not build the application for the simulator. Error launching
application on iPhone 12 Pro Max.
Please run a flutter clean and then post the outputs when you run these commands:
pub get
and
flutter build ios
I upgraded to Xamarin.Forms 3.6 and the following error occurs.
System.MissingMethodException: 'Method 'CanvasImageSource.get_SizeInPixels()' from assembly 'Microsoft.Graphics.Canvas' was not included in compilation, but was referenced in ImageRenderer.GetDesiredSize(double, double). There may have been a missing assembly, or a dependency on a more recent Windows SDK release.'
The error occurs on this line:
Absoluate.Layout.SetLayoutBounds(navigationlayout, new Rectangle(0, 0, 1, 46);
In Xaml, navigation layout is
<StackLayout x:Name="navigationlayout" Orientation="Horizontal" AbsoluteLayout.LayoutFlags="WidthProportional">
...
</StackLayout>
I also installed the latest pre-release Xamarin.Forms 4.0.0-pre5 gives the same error.
Reverting back to Xamarin.Forms 3.5.0.169047, the app runs normally.
I found the answer in Github.
(1) In UWP project, install Win2D Nuget package.
(2) In UWP project, set the minimum target to Windows 10, version 1803 (10.0; Build 17134)
Update to Xamarin.Forms 3.6. Viola, the UWP app runs smoothly.
Visual Studio Version:
14.0.25431.01 Update 3
Xamarin.Android Version:
7.0.2.42
Xamarin Forms Version:
Tried 2.3.3.193, 2.3.4.192-pre2 & 2.3.3.180.
Operating System & Version:
Win 10 Pro ver. 1607 build 14393.693
Google Play Services Version:
Xamarin.GooglePlayServices.Awareness ver. 42.1001.0
Describe your Issue:
Xamarin.GooglePlayServices.Awareness doesn't work with Xamarin Forms.
Error:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2072,3): error MSB6006: "java.exe" exited with code 2
Steps to Reproduce:
Create a blank Xamarin Forms project & use Xamarin.GooglePlayServices.Awareness as described in Xamarin's blog post.
This error often caused by dex methods count limits. You should turn on "MultiDex" support in android project settings. Also you should update ProGuard in Android SDK (see Xamarin.Android release notes - https://developer.xamarin.com/releases/android/xamarin.android_7/xamarin.android_7.1/)
I know that it was mentioned JSON.NET will work on WP Mango 7.1 in 4.0.5, and to use 3.x for now, however this is not working for me as 4.x was... It's not handling deserialization the same way for some reason, so I'm wondering if there's a way that I can build 4.0.4 from source to work on 7.1 now, without getting the Deserialization error:
Could not load type 'System.Dynamic.IDynamicMetaObjectProvider' from assembly 'System.Core, Version=3.7.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC'.
See my answer here - Moving to JSON.NET 4.0.3 broke my app
Quick solution - change the dll reference from the SL build to SL3-wp
I have a Windows Phone 7.1 (Mango) application that was using JSON.NET 4.0.2.
I upgraded it to 4.0.3 and now I get all kinds of error.
A deserialized class that was working before is now throwing this error :
Could not load type 'System.Dynamic.IDynamicMetaObjectProvider' from assembly 'System.Core, Version=3.7.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC'.
I also make use of the Linq feature by using JArray and now I get this message:
{"Could not load type 'Newtonsoft.Json.Linq.JArray' from assembly 'Newtonsoft.Json, Version=4.0.3.0, Culture=neutral, PublicKeyToken=30AD4FE6B2A6AEED'."}
I tried cleaning the solution. I tried copying the DLLs one more time.
Any suggestions?
The problem is that Windows Phone 7.1 defaults to the Silverlight 4 build if no explicit Silverlight 4 WP build is specified. Silverlight 4 has features that aren't available on WP which is why this causes Json.NET to break.
This will be fixed in 4.0.5 by having the current Windows Phone 7.0 dll used for 7.1 but for now to fix the problem just change the dll reference to the Newtonsoft.Json.dll file in the sl3-wp directory.