unosquare / embedio

A tiny, cross-platform, module based web server for .NET
http://unosquare.github.io/embedio
Other
1.47k stars 176 forks source link

Xamarin Android - Problem with Embebbed Resources #435

Closed cruiserupce closed 4 years ago

cruiserupce commented 4 years ago

I downloaded the source code for EmbedIO.

I had no problem to run it in my Visual Studio.

https://github.com/unosquare/embedio/blob/master/src/EmbedIO.Forms.Sample/EmbedIO.Forms.Sample/App.xaml.cs

So I was running this setting ...

Both Buttons work nicely, unfortunately the

    <wv:FormsWebView x:Name="WebContent"
                     Grid.Row="0"
                     Grid.Column="0"
                     Source="http://127.0.0.1:8080/index.html" />

Was 404 in both application and Chrome.

I tried both Embebbed and Static resources and I was unable to make it work on pixel API 28 emulator.

Please help I love the idea of serving local html files on both IOS and Android.

cruiserupce commented 4 years ago

Problem solved, I had to set the resource property (index.html) as Embebbed Resource and then it worked as a magic.

image

geoperez commented 4 years ago

Cool! Thanks for using EmbedIO.

I'm closing this issue.