laptop and a wrench

Bug

Initiating a fragment containing the map layout view after the app launches, and rotating the device causes the app to crash for ArcGIS Runtime SDKs for Android.

Zuletzt veröffentlicht: December 2, 2021 ArcGIS Runtime SDK
Bug-ID-Nummer BUG-000141674
EingereichtJuly 23, 2021
Zuletzt geändertJune 5, 2024
Gilt fürArcGIS Runtime SDK
Gefunden in Version100.11
BetriebssystemAndroid
Betriebssystemversion11.x
StatusWill Not Be Addressed

Zusätzliche Informationen

The Fragment is not handling the orientation changes appropriately. In the Fragment and Activity lifecycles, the dispose method on the MapView is called when the Activity's onDestroy call is made with an orientation change. This is followed by the onCreate method of Fragment which attempts to add a new Fragment with MapView causing the previous Fragment and MapView to be disposed, but the previous Fragment with MapView has not been instantiated yet. Every time the device is rotated, a new Fragment with a MapView is being created and added to the FragmentManager. The previously created fragments are still in the FragmentManager and attempt to instantiate. Below is an example (one way) of handling orientation changes that ensures the MapView is resumed and the Fragment instance created from the savedInstanceState. if (savedInstanceState == null) { val fragment1 = Fragment1() val button1 = findViewById

Bug-ID: BUG-000141674

Software:

  • ArcGIS Runtime SDK

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln