My MAUI app throws a 'Resource Not Found Exception' directly on startup. How do I find out what sresource has gone missing?
Android.Content.Res.Resources+NotFoundException 'String resource ID #0x7f1000bc'
It could be an invalid data type as I've read about this exception, but I have no clue where to look or what resource is causing this.
Call stack:
Android.Content.Res.Resources+NotFoundException
Message=String resource ID #0x7f1000bc
0xFFFFFFFFFFFFFFFF in Android.Runtime.RuntimeNativeMethods.monodroid_debugger_unhandled_exception
0x1A in Android.Runtime.JNINativeWrapper._unhandled_exception at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:12,5
0x23 in Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPLLL_L at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:364,26
0x17 in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw
0x6C in Java.Interop.JniEnvironment.InstanceMethods.CallVoidMethod at /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop/obj/Release/net7.0/JniEnvironment.g.cs:20370,5
0x38 in Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod at /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:66,7
0x29 in AndroidX.AppCompat.Widget.Toolbar.SetNavigationContentDescription at C:\a\_work\1\s\generated\androidx.appcompat.appcompat\obj\Release\net6.0-android\generated\src\AndroidX.AppCompat.Widget.Toolbar.cs:2582,5
0xBE in Microsoft.Maui.Controls.Platform.ToolbarExtensions.UpdateBackButton at D:\a\_work\1\s\src\Controls\src\Core\Platform\Android\Extensions\ToolbarExtensions.cs:113,6
0x7 in Microsoft.Maui.Controls.Toolbar.MapBackButtonVisible at D:\a\_work\1\s\src\Controls\src\Core\Toolbar\Toolbar.Android.cs:180,4
0x8 in Microsoft.Maui.PropertyMapperExtensions.<>c__DisplayClass2_0<Microsoft.Maui.Controls.Toolbar,Microsoft.Maui.Handlers. at D:\a\_work\1\s\src\Core\src\PropertyMapperExtensions.cs:66,79
0x2D in Microsoft.Maui.PropertyMapperExtensions.<>c__DisplayClass1_0<Microsoft.Maui.Controls.Toolbar,Microsoft.Maui.Handlers. at D:\a\_work\1\s\src\Core\src\PropertyMapperExtensions.cs:46,6
0x21 in Microsoft.Maui.PropertyMapper<Microsoft.Maui.IToolbar,Microsoft.Maui.Handlers.IToolbarHandler>. at D:\a\_work\1\s\src\Core\src\PropertyMapper.cs:172,6
0x17 in Microsoft.Maui.PropertyMapper.UpdatePropertyCore at D:\a\_work\1\s\src\Core\src\PropertyMapper.cs:47,4
0x1D in Microsoft.Maui.PropertyMapper.UpdateProperties at D:\a\_work\1\s\src\Core\src\PropertyMapper.cs:82,5
0xCB in Microsoft.Maui.Handlers.ElementHandler.SetVirtualView at D:\a\_work\1\s\src\Core\src\Handlers\Element\ElementHandler.cs:79,4
0xC0 in Microsoft.Maui.Platform.ElementExtensions.ToHandler at D:\a\_work\1\s\src\Core\src\Platform\ElementExtensions.cs:99,5
0x2 in Microsoft.Maui.Platform.ElementExtensions.ToPlatform at D:\a\_work\1\s\src\Core\src\Platform\ElementExtensions.cs:127,4
0xD3 in Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.OnCreateView at D:\a\_work\1\s\src\Controls\src\Core\Compatibility\Handlers\Shell\Android\ShellSectionRenderer.cs:107,4
0x24 in AndroidX.Fragment.App.Fragment.n_OnCreateView_Landroid_view_LayoutInflater_Landroid_view_ViewGroup_Landroid_os_Bundle_ at C:\a\_work\1\s\generated\androidx.fragment.fragment\obj\Release\net6.0-android\generated\src\AndroidX.Fragment.App.Fragment.cs:2031,4
0xD in Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPLLL_L at /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:363,5
Strangely VS did not give me an error upon building the app.
First of all, please check the official document about the XAML errors and warnings to check if you have enabled it or not.
And then, I have tested the similar code in the Visual Studio 2022 17.10.2 and Visual Studio 17.11.0 Preview 2.0.
In Visual Studio 17.11.0 Preview 2.0: It will show the XFC0066 Invalid Xaml error when I built or run the project.
In the Visual Studio 2022 17.10.2: It will show the the Error XFC0000 Cannot resolve type error when I built and run the project.