Error Inflating Class <unknown>

Nathan Sokalski 4,116 Reputation points
2023-02-27T00:32:14.9233333+00:00

When running my app, I receive the following message:

Java.Lang.RuntimeException

Binary XML file line #1 in com.companyname.illusionexperimental:layout/activity_main: Binary XML file line #1 in com.companyname.illusionexperimental:layout/experimentallayout: Error inflating class <unknown>

experimentallayout is an XML layout file included in activity_main as follows:

<include android:visibility="visible" android:id="@+id/incExperimentalLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_column="0" android:layout_row="0" layout="@layout/experimentallayout"/>

Both activity_main and ExperimentalLayout.xml have the following as line #1 (the line stated in the error message):

<?xml version="1.0" encoding="utf-8"?>

The Designer in Visual Studio 2022 displays the files without any problem, and compiles without any problem. How can I determine what the problem is?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,291 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,346 questions
{count} votes