AvaloniaCommunity / Prism.Avalonia

Prism framework support for Avalonia UI
https://www.nuget.org/packages/Prism.Avalonia/
MIT License
271 stars 36 forks source link

[Issue] Cannot start Avalonia app on android simulator #91

Open orrest opened 10 months ago

orrest commented 10 months ago

Description

Cannot start avalnoia app on android simulator, however, the application can be started on Windows desktop.

Environment

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''

DamianSuess commented 10 months ago

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.

DamianSuess commented 2 months ago

Currently, the migration to Prism v9.0 is underway. Though the Desktop is the primary target, we can still sandbox Android.