FAILURE: Build failed with an exception - raise minSdkVersion to 21 ?

I’m just now trying to make a build using Solar2D 2024.3709 to one of my apps and I get this error in the console:


FAILURE: Build failed with an exception.
17:47:34.663
17:47:34.663 * What went wrong:
17:47:34.663 Execution failed for task ‘:App:processReleaseMainManifest’.
17:47:34.663 > Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 21 declared in library [com.google.android.gms:play-services-ads:23.3.0] C:\Users\Acer.gradle\caches\transforms-4\d11c4b89c916a1f5f6e501585155c179\transformed\jetified-play-services-ads-23.3.0\AndroidManifest.xml as the library might be using APIs not available in 19
17:47:34.663 Suggestion: use a compatible library with a minSdk of at most 19,
17:47:34.663 or increase this project’s minSdk version to at least 21,
17:47:34.663 or use tools:overrideLibrary=“com.google.android.gms.ads.impl” to force usage (may lead to runtime failures)

Nevertheless I made a build for this app 10 days ago and I didn’t get this error.
Will we now have to raise the minSdkVersion to 21 for all our apps because the library “com.google.android.gms:play-services-ads:23.3.0” requires it?

Pretty much Google Ads v23 requires a min of 21, I just updated the plugin to auto raise this for you.
Thanks,
Scott

1 Like

I see … Thank you Scott.
I’ll have to accept raising it to 21 and assume some of my users won’t be able to upgrade, but I guess it’s for the greater good.

must I also set minSDKVersion = 21 in build.settings?

Yes, it is necessary with the latest version of Admob, although according to Scott, the plugin raise it for you.

2 Likes