Regarding the android minsdk version in .net maui

Faizan Khan 0 Reputation points
2024-02-26T11:16:21.29+00:00

Severity Code Description Project File Line Suppression State Error AMM0000 uses-sdk:minSdkVersion 19 cannot be smaller than version 21 declared in library C:\Mtechwebx folder\M-PriceCheker\obj\Debug\net7.0-android\lp\132\jl\AndroidManifest.xml as the library might be using APIs not available in 19 Suggestion: use a compatible library with a minSdk of at most 19, or increase this project's minSdk version to at least 21, or use tools:overrideLibrary="androidx.security" to force usage (may lead to runtime failures) Directory 'obj\Debug\net7.0-android\lp\132' is from 'androidx.security.security-crypto.aar'. M-PriceCheker C:\Mtechwebx folder\M-PriceCheker\obj\Debug\net7.0-android\AndroidManifest.xml 34

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
745 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,138 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 38,371 Reputation points Microsoft Vendor
    2024-02-27T03:02:16.4433333+00:00

    Hello,

    This error is expected. According to MAUI official documentation, Android APIs lower than 21 are not supported.

    .NET Multi-platform App UI (.NET MAUI) apps can be written for the following platforms:

    Android 5.0 (API 21) or higher. iOS 11 or higher, using the latest release of Xcode. macOS 10.15 or higher, using Mac Catalyst. Windows 11 and Windows 10 version 1809 or higher, using Windows UI Library (WinUI) 3. .NET MAUI Blazor apps have the following additional platform requirements: Android 7.0 (API 24) or higher is required iOS 14 or higher is required. macOS 11 or higher, using Mac Catalyst.

    Therefore, you cannot set the minimum sdkVersion to 19.

    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