Xamarin.Forms 5.0.0.2291 Android error: Java.lang.IllegalArgumentException: No view found for id

EJ 366 Reputation points
2021-12-15T23:37:58.063+00:00

Hi,

Updated Xamarin Forms to latest 5.0.0.2291 and now getting this error on Android:

Java.Lang.IllegalArgumentException: 'No view found for id 0x2d (unknown) for fragment FragmentContainer{ef93ead} (31032d6d-a62d-472e-b8e9-76423a0b46b9 id=0x2d)

Revert back to 5.0.0.2244 and works fine.

Call stack at the time of crash:

0xFFFFFFFFFFFFFFFF in System.Diagnostics.Debugger.Mono_UnhandledException_internal C#
  0x1 in System.Diagnostics.Debugger.Mono_UnhandledException at /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/corlib/System.Diagnostics/Debugger.cs:125,4 C#
  0x3E in Android.Runtime.DynamicMethodNameCounter.33 C#
  0x12 in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw at /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:157,13 C#
  0x8E in Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod C#
  0x21 in Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeNonvirtualVoidMethod C#
  0x3C in Android.Views.View.Measure at /Users/builder/azdo/_work/1/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-29/mcw/Android.Views.View.cs:16637,5 C#
  0x2F in Navigation.XF.Droid.DrawerView.TabPageRenderer.OnLayout C#
  0x10 in Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII at D:\a\1\s\Xamarin.Forms.Platform.Android.FormsViewGroup\obj\Release\generated\src\Xamarin.Forms.Platform.Android.FormsViewGroup.cs:206,4 C#
  0x2F in Android.Runtime.DynamicMethodNameCounter.33 C#
  0xFFFFFFFFFFFFFFFF in Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a C#
  0x79 in Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod C#
  0x65 in Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod C#
  0x97 in Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout at D:\a\1\s\Xamarin.Forms.Platform.Android.FormsViewGroup\obj\Release\generated\src\Xamarin.Forms.Platform.Android.FormsViewGroup.cs:189,5 C#
  0x171 in Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementTracker.cs:111,5 C#
  0x1E in Xamarin.Forms.Platform.Android.VisualElementRenderer<DevExpress.XamarinForms.Navigation.TabPage>.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:139,4 C#
  0x2B in Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Platform.Android.IPlatformLayout.OnLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:239,4 C#
  0x2D in Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\PlatformRenderer.cs:78,4 C#
  0x10 in Android.Views.ViewGroup.n_OnLayout_ZIIII at /Users/builder/azdo/_work/1/s/xamarin-android/src/Mono.Android/obj/Release/monoandroid10/android-29/mcw/Android.Views.ViewGroup.cs:3612,4 C#
  0x2F in Android.Runtime.DynamicMethodNameCounter.27 C#

Any ideas?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,253 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bhauraj Biradar 0 Reputation points
    2023-10-15T11:50:02.41+00:00

    I am also getting same error, I uses 5.0.0.2578 Xamarin forms version.. what is the cause?