Skip to content

Commit bebd441

Browse files
[tests] fix ClassLibraryMainLauncherRuns
This test was crashing on app start with: Java.Lang.RuntimeException: Unable to start activity ComponentInfo{com.xamarin.classlibrarymainlauncherruns/com.xamarin.classlibrarymainlauncherruns.MainActivity}: android.view.InflateException: Binary XML file line #1 in com.xamarin.classlibrarymainlauncherruns:layout/foo: Binary XML file line #1: You must supply a layout_width attribute. ---> Android.Views.InflateException: Binary XML file line #1 in com.xamarin.classlibrarymainlauncherruns:layout/foo: Binary XML file line #1: You must supply a layout_width attribute. ---> Java.Lang.UnsupportedOperationException: Binary XML file line #1: You must supply a layout_width attribute. --- End of managed Java.Lang.UnsupportedOperationException stack trace --- java.lang.UnsupportedOperationException: Binary XML file line #1: You must supply a layout_width attribute. It seems like this would have always been broken, so I'm not exactly sure how it is passing in some cases.
1 parent 28f4a06 commit bebd441

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/MSBuildDeviceIntegration/Tests/DebuggingTest.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,13 @@ public void ClassLibraryMainLauncherRuns ()
102102
// Remove the default MainActivity.cs & AndroidResources
103103
app.AndroidResources.Clear ();
104104
app.AndroidResources.Add (new AndroidItem.AndroidResource ("Resources\\layout\\foo.xml") {
105-
TextContent = () => "<?xml version=\"1.0\" encoding=\"utf-8\" ?><LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\" />"
105+
TextContent = () =>
106+
@"<?xml version=""1.0"" encoding=""utf-8""?>
107+
<LinearLayout
108+
xmlns:android=""http://schemas.android.com/apk/res/android""
109+
android:layout_width=""fill_parent""
110+
android:layout_height=""wrap_content""
111+
/>"
106112
});
107113
app.Sources.Remove (app.GetItem ("MainActivity.cs"));
108114

0 commit comments

Comments
 (0)