Gorilla-Player-Support
Gorilla-Player-Support copied to clipboard
Root XAML element unrecognized, nothing to display
Hi,
First of all, great job! Thanks!
But I have a very annoying issue now. I'm using MvvmCross and all its ContentPage is required to be MvxContentPage like this:
<?xml version="1.0" encoding="utf-8" ?>
<views:MvxContentPage x:TypeArguments="viewModels:DeviceScanViewModel"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:viewModels="clr-namespace:uProject.Core.ViewModels"
xmlns:views="clr-namespace:MvvmCross.Forms.Views;assembly=MvvmCross.Forms">
<ContentPage.Content>
<StackLayout VerticalOptions="StartAndExpand">
<Label Text="Welcome to Xamarin.Forms!"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand" />
<ListView ItemTemplate="{StaticResource ItemDataTemplateSelector}" ItemsSource="{Binding Devices}"
VerticalOptions="FillAndExpand">
</ListView>
</StackLayout>
</ContentPage.Content>
</views:MvxContentPage>
But in this case, Gorilla refuses to display the page and the erros says:
Root XAML element unrecognized, nothing to display
To workaround this, I change views:MvxContentPage
to ContentPage
every time just to preview it in Gorilla and then change it back.
Any better workaround?
I also have this error. Is Gorilla Player compatible with MvvmCross?
cc: @pablogupi @xufeipyxis
I'd say its any custom class or inheritance. I just ran into the same thing WITHOUT mvvcross, simply because my views are inherited from a ViewBase class, which is derived from ContentView
.
Lack of inheritance support just killed this for me as being a replacement for LiveReload.
You need to use Gorilla SDK to preview this. Please follow the instructions listed there and let me know if you have any issue.
@LeoHere - I followed the directions in there but it doesn't work when the top a page is inhereted from some type like BaseContentPage which inherits ContentPage. I added that type to the LoadApplication but it doesn't know that the basecontentpage is a contentpage still.
@radderz can you attach your MainActivity.cs
if you are in Android or AppDelegate.cs
if iOS. Can you attach a screenshot of the error you are seeing please?
Hi @LeoHere, the error is identical to the above error, Root XAML element unrecognised.
My pages inherit from basecontentpage which inherits from contentpage
<?xml version="1.0" encoding="utf-8" ?> <views:BaseContentPage xmlns="http://xamarin.com/schemas/2014/forms"
This is my LoadApplication
LoadApplication(UXDivers.Gorilla.Droid.Player.CreateApplication( this, new UXDivers.Gorilla.Config(new Uri("http://192.168.98.199:9014"), true) .RegisterAssemblyFromType<BaseContentPage>() .RegisterAssemblyFromType<FFImageLoading.Forms.CachedImage>() ));
@radderz
I asked for the screenshot because I want to make sure you are running your Gorilla SDK and not the Player app (previously available in the stores).
Does your Gorilla navigation bar looks like in the screenshot below? Is it orange or red?
Orange (as in the screenshot) means you are running the Player app, that you get from the store or you deploy yourself. Not Gorilla SDK. Red means you are running Gorilla SDK.
Also, what version of Gorilla SDK are you using?