Xamarin.Forms Android VS2017 debug not showing XAML changes

落花浮王杯 提交于 2021-01-28 06:08:54

问题


In Visual Studio 2017, I start a brand new Xamarin.Forms solution, PCL and Blank App template.

Here is what the MainPage.xaml content looks like:

<Label Text="Welcome to Xamarin Forms!" 
           VerticalOptions="Center" 
           HorizontalOptions="Center" />

Using the Visual Studio Android emulator, I start a debug session, to confirm its working, and then close it.

Then I make a small change the MainPage.xaml file, for example:

<StackLayout HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand">
    <EntryCell Label="UserName : "></EntryCell>
    <EntryCell Label="Password : "></EntryCell>
</StackLayout>

And then I start a debug session again. The emulator behaves as if I never made any changes. The app UI still says "Welcome to Xamarin Forms!".

I tried the following, and none of them change the behavior. The emulator will act as if the very first code that was sent to it is still running.

  1. Restart emulator
  2. Clean/Rebuild solution
  3. Manually delete bin and obj folders
  4. Close VS2017 and entire VS Android emulator manager and reopen
  5. Reboot entire PC
  6. Everything in this answer - Xamarin Forms Android App Crashes Running Debug with VS Android Emulator

If I start up a new project, do all of the above, and the exact same thing will happen. I have also tried using the default android emulators (from AVDs), and they do not work at all, when I try to debug I simply get a white screen.

来源:https://stackoverflow.com/questions/45227700/xamarin-forms-android-vs2017-debug-not-showing-xaml-changes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!