Android crash when displaying a custom marker info window using markerInfoContents
Using markerInfoContents to display a custom NativeScript view causes Android to crash on API 36, API 37, and a physical Android device.
Error
java.lang.IllegalStateException:
The specified child already has a parent.
You must call removeView() on the child's parent first.
Cause
In packages/google-maps/index.android.ts, the plugin adds info.view to a GridLayout container but returns the child:
container.addChild(info.view)
return info.view.nativeView
Because the returned child already belongs to the container, Google Maps attempts to attach an already-parented view.
Suggested fix
Return the wrapper container instead:
return container.nativeView
The custom information-window view should display without crashing when repeatedly opening markers.

Android crash when displaying a custom marker info window using
markerInfoContentsUsing
markerInfoContentsto display a custom NativeScript view causes Android to crash on API 36, API 37, and a physical Android device.Error
Cause
In
packages/google-maps/index.android.ts, the plugin addsinfo.viewto aGridLayoutcontainer but returns the child:Because the returned child already belongs to the container, Google Maps attempts to attach an already-parented view.
Suggested fix
Return the wrapper container instead:
The custom information-window view should display without crashing when repeatedly opening markers.