Forum Xamarin Xamarin.Android

Resources/xml files cause Java.Lang.NullPointerException

The presence of any xml file in Resources/xml causes the following error when calling SetContentView on my MainView (using mvvmcross) even though this view has no relation to the xml, actually the xml isn't used in my application at all yet. The name of the file or the contents doesn't seem to matter. If there is a file in Resources/xml then the exception occurs.

Unhandled Exception:
Java.Lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.ContentFrameLayout.setId(int)' on a null object reference

I need a file in Resources/xml so I can use the android PreferenceScreen

Answers

Sign In or Register to comment.