0

When I targeted Android 9.0 (Pie) in Android part of Xamarin.Forms app the Preview of UI produces an error and show nothing.

enter image description here enter image description here enter image description here

Open a new Xamarin.Forms App in VS For Mac then update all of the Android Packages. After that, target your app to Android 9.0 as I described above. Finally you should run one time your app in an Android Emulator and you will see the error in Preview Tool in VS for Mac. The problem isn't in app. App is running well but I can't see preview of the UI to change things immediately.

(Error: android/view/View.OnUnhandledKeyEventListener)

  • the previewer sucks and only causes strange errors and never showed my anything. use [Hotrelead](https://github.com/AndreiMisiukevich/HotReload) instead. – magicandre1981 Mar 07 '19 at 16:15
  • I tried the Hot Reload and it is impressive. Thanks for your suggestion man. But I am still curious about my problem :) – Mucahit Aktepe Mar 08 '19 at 06:55
  • 1
    I can understand that you are curious but for your sake, I'd suggest give up Visual Studio built-in Previewer. Yout view is now pretty simple and you can't get the previewer working. Imagine what will happen when you have a complex UI. Better not waste time & use 3rd party tools. You can try either HotReload (as @magicandre1981 suggested) or LiveXAML. Anything is better than the built-in one – lawiluk Mar 08 '19 at 09:22
  • Thank you man. You are right. I am going to use 3rd party tools. – Mucahit Aktepe Mar 09 '19 at 12:39

0 Answers0