parse-community / Parse-SDK-dotNET

Parse SDK for .NET, Xamarin, Unity.
http://parseplatform.org
Apache License 2.0
323 stars 260 forks source link

Parse failed to initialize in Xamarin Forms Project #326

Closed Basttyy closed 4 years ago

Basttyy commented 4 years ago

After building the nugget and installing in Xamarin Forms project, when android project launches it breaks with the following error

{System.TypeInitializationException: The type initializer for 'VersionInformation' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Parse.ParseClient+Configuration+VersionInformation..cctor () [0x0000f] in :0 --- End of inner exception stack trace --- at Parse.ParseClient.Initialize (Parse.ParseClient+Configuration configuration) [0x0002f] in :0 at RFIDWallet.Droid.MainActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x00022] in C:\Users\Basttyy\source\repos\RFIDWallet\RFIDWallet.Android\MainActivity.cs:24 at Android.App.Activity.n_OnCreate_Landroid_osBundle (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x00011] in <11f101b564894ca7af6c482ddc51c698>:0 at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.11(intptr,intptr,intptr)}

is there any quick fix to this?

TobiasPott commented 4 years ago

Hi @Basttyy The version providet via NuGet (I assume you mean that by 'nugget') is not equal to the latest state of this repository and you are out of luck getting a fix to that. I actually can't tell who takes care about the NuGet package and from where it is provided.

You will most likely need to build the dll from the sources (or the sources from another fork/branch as mentioned in other threads. There have been some issues pointing to the same exception you mentioned which have been solved (thus my advice to check other issues first).

Best Regards