am observing an issue with Xamarin.Forms application on Android. Generally it works fine, but randomly it crashes with a message like
crc643f46942d9dd1fff9.PlatformRenderer.onMeasure PlatformRenderer.java, line 63 Java.Lang.IllegalStateException: View with id -1: crc643f46942d9dd1fff9.FlyoutPageRenderer#onMeasure() did not set the measured dimension by calling setMeasuredDimension()
or
androidx.appcompat.widget.ContentFrameLayout.onMeasure ContentFrameLayout.java, line 145 java.lang.IllegalStateException: View with id -1: crc643f46942d9dd1fff9.PlatformRenderer#onMeasure() did not set the measured dimension by calling setMeasuredDimension()
The navigation scheme is master-detail (using FlyoutPage class rather than the obsolete MasterDetailPage class), there are some Syncfusion controls (listview, toggle button), AndroidX packages.
It is impossible to replicate on will, I can see these errors only in application telemetry logs.
Any ideas where such issue may come from?
thanks
Jiri
You could force the call of the setMeasuredDimension inside your onMeasure() method to fix the issue.