Setting up subscriptions from scratch? Start with the full .NET MAUI + RevenueCat setup guide — then come back here the moment the build breaks with AMM0000.
You added an in-app billing package to your .NET MAUI app (RevenueCat wrapper, Plugin.InAppBilling, or anything pulling Google Play Billing), hit build, and got a wall of this:
java.exe error AMM0000: ...\AndroidManifest.xml Warning:
Namespace 'com.android.billingclient' is used in multiple modules and/or libraries:
AndroidManifest.xml, AndroidManifest.xml. Please ensure that all modules and
libraries have a unique namespace.
java.exe error AMM0000: Namespace 'com.google.android.gms.base' is used in multiple modules...
java.exe error AMM0000: Namespace 'com.google.firebase.encoders.json' is used in multiple modules...
Build FAILED.
Dozens of repeated "namespace" errors pointing at billing.aar, play-services-base.aar, and friends. Cleaning bin/obj doesn't help. Downgrading packages doesn't help.
The trap
Those namespace lines are not your problem. They're warnings from the Android manifest merger that .NET for Android surfaces with an error AMM0000 prefix, which makes everyone chase the wrong thing (I did too).
Scroll to the bottom of the error output. The actual build-killer is almost always this:
uses-sdk:minSdkVersion 21 cannot be smaller than version 23 declared in library
[...androidx.lifecycle...]
Suggestion: use a compatible library with a minSdk of at most 21,
or increase this project's minSdk version to at least 23
The .NET MAUI project template sets Android minimum to API 21. The Play Billing dependency chain (via androidx.lifecycle and GMS libraries) requires API 23+. The merger fails on that one real error — and dumps every accumulated warning alongside it, burying the signal.
The fix (one line)
In your .csproj, raise the Android minimum:
<SupportedOSPlatformVersion
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
24.0
</SupportedOSPlatformVersion>
Rebuild. The minSdk error is gone, the namespace warnings stop being fatal, and the build passes:
Build succeeded.
0 Error(s)
Why 24 and not 23?
23 satisfies today's constraint; 24 clears the next library in the chain that wants it and still covers ~97%+ of active Android devices. If your analytics say you need 23, use 23 — the point is anything ≥ the version named in your error message.
Things that do NOT fix it (save yourself the afternoon)
- ❌ Cleaning
binandobj - ❌
<AndroidManifestMerger>legacy</AndroidManifestMerger>— the warnings persist and you lose modern merger features - ❌
tools:overrideLibrary— works around the symptom, invites runtime crashes on old devices - ❌ Downgrading the billing package — the androidx floor moved ecosystem-wide
The pattern to remember
When .NET for Android gives you a wall of AMM0000 output: ignore every line that says Warning: and read the last block. The merger reports exactly one fatal condition; everything else is decoration.
This is one of a dozen integration landmines I defused while building *MidasKit** — a .NET MAUI subscription-app boilerplate with RevenueCat, Stripe web checkout, auth, and a finished paywall already wired and compiling. If you're adding billing to a MAUI app right now, it'll save you the rest of the week.*
Top comments (0)