Ionic build apk , but not build show gradle error

Task :app:processDebugMainManifest FAILED
D:\Mw/App\awarathon\letest_new_PWA\platforms\android\app\src\main\AndroidManifest.xml Error:
uses-sdk:minSdkVersion 19 cannot be smaller than version 21 declared in library [androidx.core:core-splashscreen:1.0.0] C:\Users\sutha.gradle\caches\transforms-3\8fa35d5508191c4f9f8ca09de1273d1b\transformed\jetified-core-splashscreen-1.0.0\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.core.splashscreen” to force usage (may lead to runtime failures)

See Manage manifest files  |  Android Studio  |  Android Developers for more information about the manifest merger.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:processDebugMainManifest’.

Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 21 declared in library [androidx.core:core-splashscreen:1.0.0] C:\Users\sutha.gradle\caches\transforms-3\8fa35d5508191c4f9f8ca09de1273d1b\transformed\jetified-core-splashscreen-1.0.0\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.core.splashscreen” to force usage (may lead to runtime failures)

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use ‘–warning-mode all’ to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See Command-Line Interface

BUILD FAILED in 2s
16 actionable tasks: 3 executed, 13 up-to-date
Command failed with exit code 1: D:\Mw App\awarathon\letest_new_PWA\platforms\android\gradlew -b D:\Mw\App\awarathon\letest_new_PWA\platforms\android\build.gradle cdvBuildDebug
[ERROR] An error occurred while running subprocess cordova.

    cordova.cmd build android exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.

Which cordova-android version are you using?

Latest cordova-android (version 12) supports SDK 24+

Do you have a android-minSdkVersion entry in your config.xml file?
If so, remove it and let it use the default (24 as I mentioned earlier)

If you didn’t add the android-minSdkVersion, then probably some plugin is adding it.

1 Like
[quote="chintak1812, post:1, topic:240263"]
Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 21 declared in library [androidx.core:core-splashscreen:1.0.0]
[/quote]

splashscreen needs version 21 and your project has version 19