Prism.Avalonia icon indicating copy to clipboard operation
Prism.Avalonia copied to clipboard

[Issue] Cannot start Avalonia app on android simulator

Open orrest opened this issue 1 year ago • 2 comments

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

orrest avatar Aug 09 '23 07:08 orrest

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 avatar Aug 15 '23 13:08 DamianSuess

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

DamianSuess avatar Apr 12 '24 21:04 DamianSuess

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

DamianSuess avatar Aug 24 '24 21:08 DamianSuess