AMM0000 Error at AndroidManifest.xml in .Net MAUI app

TD D 5 Reputation points
2023-10-04T13:53:56.9733333+00:00

Hi all,

Pleas help advising the fix as the Visual Studio compiler cites error AMM0000 at line : <uses-sdk tools:overrideLibrary="com.microsoft.maui" android:minSdkVersion="19" /> in AndroidManifest.xml in .Net MAUI app after I use tools:overrideLibrary="com.microsoft.maui" to force usage in the AndroidManifest.xml located under Platforms/Android folder.

Thanks in advance,

Developer technologies .NET .NET MAUI
{count} votes

2 answers

Sort by: Most helpful
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 50,126 Reputation points Microsoft External Staff
    2023-10-05T05:27:30.99+00:00

    Hello,

    This is because in MAUI, the Android platform supports a minimum of API 21.

    .NET Multi-platform App UI (.NET MAUI) apps can be written for the following platforms: Android 5.0 (API 21) or higher.

    Therefore, you cannot set the minimum SDK to be smaller than 21.

    Please refer to Supported platforms for .NET MAUI apps for more details.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. TD D 5 Reputation points
    2023-10-07T15:25:41.0933333+00:00

    Hi all,

    It is not me to set the minimum SDK to be smaller than 21, you know. The compiler automatically set the minimum SDK to be 19 before creating the new AndroidManifest.xml under Debug folder, less than the minimum of API 21 (Android 5.0), although I already set the minimum SDK of API 21 under Properties window. I found the fix a few minutes after raising this question to all you. Under Platforms/ Android subfolder, I opened the AndroidManifest.xml, and set Application icon and Version number together with Minimum (Android 5.0)/ Target Android version (from Android 12 or more depending on Net 6.0 or Net 7.0 version being used). After that, I cleaned and rebuilt. The error had gone. Maybe, I think I set Application icon path not correct, then the compiler cited error. Please try if you still face the same thing.

    Thanks all for your response and feedback. .Net MAUI is still clumsy, with many bugs inside. While waiting for the Microsoft .Net AMUI team to update, let's find a way to fix it ourselves. Good luck with your .Net MAUI app!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.