Prism.Avalonia
Prism.Avalonia copied to clipboard
[Issue] Cannot start Avalonia app on android simulator
Description
Cannot start avalnoia app on android simulator, however, the application can be started on Windows desktop.
Environment
- OS: Windows11 22H2
- IDE: Visual Studio 2022 17.7.0
- Project Template: Avalonia Cross Platform Application
- Android Simulator: Pixel 5 - API 33 Android 13.0
- Prism.Avalonia Version: Prism.DryIoc.Avalonia 8.1.97.11000
- Avalonia Version: 11.0.2
Steps To Reproduce
Set App
this way, then run the application:
public partial class App : PrismApplication
{
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
base.Initialize();
}
protected override AvaloniaObject CreateShell()
{
return Container.Resolve<MainWindow>();
}
protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
}
}
<Window
x:Class="AvaloniaApplication3.Views.MainWindow"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:views="clr-namespace:AvaloniaApplication3.Views"
Title="AvaloniaApplication3"
d:DesignHeight="450"
d:DesignWidth="800"
Icon="/Assets/avalonia-logo.ico"
mc:Ignorable="d">
<StackPanel>
<TextBlock Text="I'm Main Window" />
</StackPanel>
</Window>
Expected Behavior
After the avalonia splash, there will be a line : I'm Main Window.
Screenshots
An error occured:
Prism.Ioc.ContainerResolutionException: 'An unexpected error occurred while resolving 'AvaloniaApplication3.Views.MainWindow''
At this time, only Desktop applications are supported. This is something that I would like to support, however, to accomplish this goal a lot quicker, I will need assistance from the community - especially iOS.
Going to keep this item opened for whomever wants to pick this up.
Currently, the migration to Prism v9.0 is underway. Though the Desktop is the primary target, we can still sandbox Android.
Closing. Prism v8.1.97.x and Avalonia v11.0 are no longer supported
Non-desktop apps are still a work-in-progress and not fully supported at this time. It is marked for, vNext