From maui-skills
Guides migration of Xamarin.Android native apps to .NET for Android, covering SDK-style projects, MSBuild properties, AndroidManifest.xml updates, NuGet dependencies, binding libraries, and gotchas.
npx claudepluginhub davidortinau/maui-skills --plugin maui-skillsThis skill uses the workspace's default tool permissions.
For SDK-style project templates, MSBuild property tables, ABI conversion, namespace mappings, and CLI commands, see `references/android-migration-api.md`.
Guides Xamarin.Forms to .NET MAUI migration including project setup, namespace renames, layout fixes, renderer-to-handler migration, effects-to-behaviors redesign, NuGet updates, data migration, and troubleshooting.
Creates and updates slim/native Android bindings for .NET MAUI and .NET for Android using Native Library Interop (NLI). Guides Java/Kotlin wrappers, Gradle config, Maven deps, C# binding generation, AAR/JAR integration.
Migrate .NET 8 projects to .NET 9, resolving breaking changes like TFM updates, build errors, BinaryFormatter, C# 13 compiler issues, ASP.NET Core 9, and EF Core 9 adaptations.
Share bugs, ideas, or general feedback.
For SDK-style project templates, MSBuild property tables, ABI conversion, namespace mappings, and CLI commands, see references/android-migration-api.md.
⚠️ Field-tested advice: Android migration is significantly harder than iOS. Expect more UI bugs, OEM-specific rendering differences, and issues not reproducible on emulators. Test on physical devices.
dotnet new android)references/android-migration-api.md)<uses-sdk>, use csproj propertiesResource.designer.cs (regenerated automatically)<UseMauiEssentials>true</UseMauiEssentials>bin//obj/, build, test on physical devicesStrategy: Create a new project and copy code into it — don't edit the existing project file in place.
<uses-sdk> from AndroidManifest.xml<!-- ❌ Xamarin-style — causes build warnings/errors -->
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="33" />
<!-- ✅ Use MSBuild properties instead -->
<TargetFramework>net8.0-android</TargetFramework>
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
Resource.designer.csThis file is auto-generated. Leftover copies from Xamarin cause duplicate symbol errors. Delete it — it will be regenerated.
.dll.config or .exe.config Support.dll.config and <dllmap> are not supported in .NET Core. If your app uses System.Configuration.ConfigurationManager, migrate to appsettings.json or platform preferences.
// ❌ Forgetting this → permissions silently fail
// ✅ Required in EVERY Activity that uses Essentials
public override void OnRequestPermissionsResult(
int requestCode, string[] permissions, Permission[] grantResults)
{
Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
AndroidManifest.xml is now in the project root (not Properties/). The SDK-style project finds it there by default.
| Pitfall | Impact | Mitigation |
|---|---|---|
| OEM rendering differences | UI bugs not visible on emulators | Test on physical devices from multiple vendors |
| Shadow rendering varies by OEM/API level | Inconsistent shadow appearance | Implement shadows in platform-specific handler code |
| Android Wear references | Not supported in .NET for Android | Remove Wear project references |
MAndroidI18n removed | Encoding errors at runtime | Replace with System.Text.Encoding.CodePages NuGet |
AotAssemblies deprecated | Build warnings | Use RunAOTCompilation instead |
jar2xml not supported | Binding library build failures | Use default class-parse parser |
DebugType=full not supported | Build errors | Use default portable |
Android is unique: packages targeting monoandroid still work on .NET for Android. No recompilation needed for most Android-specific packages. This is NOT true for iOS/Mac.
If no compatible version exists:
If your migrated app will also adopt .NET MAUI controls (e.g., via UseMaui), check the maui-current-apis skill for deprecated MAUI APIs to avoid (ListView, Frame, Device.*, etc.).
dotnet new android)TargetFramework to net8.0-android (or later)SupportedOSPlatformVersion for minimum SDKAndroidSupportedAbis → RuntimeIdentifiers<uses-sdk> from AndroidManifest.xmlResource.designer.cs, bin/, obj/UseMauiEssentials + Platform.Init() if using EssentialsOnRequestPermissionsResult in every ActivityMAndroidI18n with System.Text.Encoding.CodePagesRunAOTCompilation, not AotAssemblies)