I have used Xamarin Native UI for Android application and Created different class library for API call and data Deserialize api data using Newtonsoft.Json.
That class library Target Framework is .NET Standar 2.0.
As I have added that reference to the console application so its working fine but same reference i have add in Android project its throw error.
**Error Details**
Newtonsoft.Json.JsonSerializationException: Unable to find a constructor to use for type. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute.
As per error message i have used attribute JsonConstructor for default constructor of class.
Example:
public class TestClass
{
[JsonConstructor]
public TestClass()
{
}
}
PreserveAttributein Arvinfraja's answerPreserveAttributerequiredMono.Android.dllOr 'Xamarin.iOS.dll' reference in that but my class library is Common for both thats why it is not possible.