简体   繁体   中英

Xamarin.Forms.GoogleMaps iOS System.NullReferenceException

The map is displayed properly with pins etc. However under iOS I'm receiving this error when switching to a different view, even without pins etc. Maybe a configuration issue in Info.plist?

System.NullReferenceException: Object reference not set to an instance of an object at Xamarin.Forms.GoogleMaps.iOS.MapRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1[TElement] e) [0x00069] in <0bdc53fe1bce4b6e878e432cac02c7af>:0

at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00110] in C:\\BuildAgent3\\work\\ca3766cfc22354a1\\Xamarin.Forms.Platform.iOS\\VisualElementRenderer.cs:167

at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x0007b] in C:\\BuildAgent3\\work\\ca3766cfc22354a1\\Xamarin.Forms.Platform.iOS\\VisualElementRenderer.cs:218

at Xamarin.Forms.Platform.iOS.ViewRenderer`2[TView,TNativeView].Dispose (System.Boolean disposing) [0x00000] in C:\\BuildAgent3\\work\\ca3766cfc22354a1\\Xamarin.Forms.Platform.iOS\\ViewRenderer.cs:42

at Xamarin.Forms.GoogleMaps.iOS.MapRenderer.Dispose (System.Boolean disposing) [0x000a8] in <0bdc53fe1bce4b6e878e432cac02c7af>:0 at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/data/lanes/4292/e66c6f19/source/xamarin-macios/src/Foundation/NSObject2.cs:133

at Xamarin.Forms.Platform.iOS.Platform.DisposeModelAndChildrenRenderers (Xamarin.Forms.Element view) [0x00038] in C:\\BuildAgent3\\work\\ca3766cfc22354a1\\Xamarin.Forms.Platform.iOS\\Platform.cs:231

at Xamarin.Forms.Platform.iOS.Platform.HandleChildRemoved (System.Object sender, Xamarin.Forms.ElementEventArgs e) [0x00007] in C:\\BuildAgent3\\work\\ca3766cfc22354a1\\Xamarin.Forms.Platform.iOS\\Platform.cs:342

at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00008] in C:\\BuildAgent3\\work\\ca3766cfc22354a1\\Xamarin.Forms.Core\\Element.cs:601

at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00022] in C:\\BuildAgent3\\work\\ca3766cfc22354a1\\Xamarin.Forms.Core\\Element.cs:604

我遇到了类似的问题,但是一旦我将xamarin.Forms.googlemaps更新到此版本https://www.nuget.org/packages/Xamarin.Forms.GoogleMaps/1.8.1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM