Xamarin.Forms.GoogleMaps iOS System.NullReferenceException

使用引脚等正确显示 Map . 但是在iOS下,当切换到不同视图时,即使没有引脚等,我也会收到此错误 . 可能是Info.plist中的配置问题?

System.NullReferenceException:对象引用未设置为<0bdc53fe1bce4b6e878e432cac02c7af>中Xamarin.Forms.GoogleMaps.iOS.MapRenderer.OnElementChanged(Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1 [TElement] e)[0x00069]中对象的实例:0

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

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

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

位于/ Users / builder / data / lanes / 4292 /中的Foundation.NSObject.Dispose()[0x00000]中的<0bdc53fe1bce4b6e878e432cac02c7af>:0中的Xamarin.Forms.GoogleMaps.iOS.MapRenderer.Dispose(System.Boolean disposing)[0x000a8] e66c6f19 /源/ xamarin-macios / src目录/基金/ NSObject2.cs:133

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

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

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

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

回答(1)

2 years ago

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