Revert "build(android): downgrade Avalonia 12 -> 11.3.20 + Avalonia.Maui 11.3.0"

This reverts commit a4bc7b5e6a.
This commit is contained in:
Paul Schneider 2026-08-22 16:09:35 +01:00
commit 77a7693276
Signed by: notazof
GPG key ID: 1DD5D838E5343B06
8 changed files with 30 additions and 74 deletions

View file

@ -1,19 +1,21 @@
using Android.App;
using Android.App;
using Android.Runtime;
using Avalonia;
using Avalonia.Android;
namespace PostIt.Android;
/// <summary>
/// Bare <see cref="Android.App.Application"/> shell for Android. Avalonia
/// 11 initialises its platform services from <see cref="MainActivity"/>
/// (which extends <c>AvaloniaMainActivity&lt;App&gt;</c>); no per-Application
/// Avalonia setup is needed here. Kept only so that the [Application] entry
/// stays present in the merged manifest, which the Android runtime expects
/// when the manifest declares a custom android:name in the application tag.
/// </summary>
[Application]
public class Application : Android.App.Application
namespace PostIt.Android
{
public Application(nint javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)
[Application]
public class Application : AvaloniaAndroidApplication<App>
{
protected Application(nint javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)
{
}
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
{
return base.CustomizeAppBuilder(builder)
.WithInterFont();
}
}
}
}

View file

@ -2,7 +2,6 @@ using Android.App;
using Android.Content.PM;
using Android.Content;
using Avalonia.Android;
using Avalonia;
using AndroidX.Emoji2.Text;
namespace PostIt.Android;
@ -15,15 +14,8 @@ namespace PostIt.Android;
MainLauncher = true,
LaunchMode = LaunchMode.SingleTask,
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)]
public class MainActivity : AvaloniaMainActivity<App>
public class MainActivity : AvaloniaMainActivity
{
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
{
return base.CustomizeAppBuilder(builder)
.UseMaui<PostIt.Maui.MauiEmbeddingApp>(this)
.WithInterFont();
}
/// <summary>
/// Strongly-typed handle to the current MainActivity instance, set in
/// <see cref="OnCreate"/> and consumed by platform services such as

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0-android36.0</TargetFramework>
<TargetFramework>net10.0-android</TargetFramework>
<!-- FORCE LES ARCHITECTURES ANDROID VALIDES -->
<RuntimeIdentifiers>android-arm64;android-x64</RuntimeIdentifiers>
<SupportedOSPlatformVersion>23.0.0</SupportedOSPlatformVersion>
@ -24,7 +24,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Android" />
<PackageReference Include="Avalonia.Maui" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PostIt\PostIt.csproj" />