Problems in android -release with extension-admob

Hello. I have a problem in lime build android -release
I’m using VS Code. So, my error message:

Execution failed for task ':app:processReleaseManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [com.google.android.gms:play-services-ads:21.1.0] C:\Gradle\gradle-6.7.1\bin\caches\transforms-2\files-2.1\9a3610c331ee4452c2502ea1d364ccf2\jetified-play-services-ads-21.1.0\AndroidManifest.xml as the library might be using APIs not available in 16   
        Suggestion: use a compatible library with a minSdk of at most 16,
                or increase this project's minSdk version to at least 19,
                or use tools:overrideLibrary="com.google.android.gms.ads.impl" to force usage (may lead to runtime failures)

When i’m trying to set minSdk in my Project.xml

<config:android minimum-sdk-version="26" target-sdk-version="29" />

I have an error:

The minSdk version should not be declared in the android manifest file. You can move the version from the manifest to the defaultConfig in the build.gradle file

So, i’m trying to set minSdk in build.gradle file:

android {
            defaultConfig
            {
                compileSdkVersion 30
                targetSdkVersion 30
                minSdkVersion 28
            }

And i got such error again

 uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [com.google.android.gms:play-services-ads:21.1.0]

So, my build.gradle configuration dont work :frowning:

My project.xml settings:

<config:android gradle-version="6.7.1" if="android" />
    <config:android gradle-plugin="3.6.1" if="android" />
    <set name="playServicesVersion" value="+" />
    <set name="supportLibraryVersion" value="+" />

Check your

\bin\android\bin\app\build\outputs\logs\manifest-merger-release-report.txt
There is some thing else / another extension adding minimum sdk of 16.

I’va found 2 log files. When i compile with “minSdkVersion 16 cannot be smaller than version 19” issue, they are empty.
When i set minSdk 28 in project.xml , and have “The minSdk version should not be declared in the android manifest file” issue, there is some mention of minSdk
first log file:

8    <uses-sdk
8-->C:\projects\Lightseekers\export\android\bin\app\src\main\AndroidManifest.xml:13:2-70
9        android:minSdkVersion="26"
9-->C:\projects\Lightseekers\export\android\bin\app\src\main\AndroidManifest.xml:13:12-38
10        android:targetSdkVersion="31" />

second log file:

INJECTED from C:\projects\Lightseekers\export\android\bin\app\src\main\AndroidManifest.xml:13:2-70
	tools:overrideLibrary
		ADDED from [com.google.android.gms:play-services-ads:21.1.0] C:\Gradle\gradle-6.7.1\bin\caches\transforms-2\files-2.1\9a3610c331ee4452c2502ea1d364ccf2\jetified-play-services-ads-21.1.0\AndroidManifest.xml:23:9-49
	android:targetSdkVersion
		ADDED from C:\projects\Lightseekers\export\android\bin\app\src\main\AndroidManifest.xml:13:39-68
		INJECTED from C:\projects\Lightseekers\export\android\bin\app\src\main\AndroidManifest.xml
		INJECTED from C:\projects\Lightseekers\export\android\bin\app\src\main\AndroidManifest.xml
	android:minSdkVersion
		ADDED from C:\projects\Lightseekers\export\android\bin\app\src\main\AndroidManifest.xml:13:12-38
		INJECTED from C:\projects\Lightseekers\export\android\bin\app\src\main\AndroidManifest.xml
		MERGED from C:\projects\Lightseekers\export\android\bin\app\src\main\AndroidManifest.xml:13:12-38
		INJECTED from C:\projects\Lightseekers\export\android\bin\app\src\main\AndroidManifest.xml

Also, i’ve made some experiments.

I set in Project.xml:

<config:android target-sdk-version="33" if="android" />

As a result, after build i got in exported file AndroidManifest.xml

<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="33"/>

So, changing targetSdk in project.xml works. So’ i deleted targetSdk in project.xml and left
in build.gradle file:

android 
{
        defaultConfig
        {
            targetSdkVersion = 33
            minSdkVersion = 24      
        }
}

As a result, after build i got in exported file AndroidManifest.xml:

<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/>

Setting SDK’s in build.gradle dont work O_o Am i doing something wrong?

Maybe i’m using wrong build.gradle file?

Yeah, i’ve used wrong build.gradle file. LOL

At the end, i’vet fixed minSdk problem, and i’ve add some strings to right build.gradle file

android {
    lintOptions {
            checkReleaseBuilds false
            abortOnError false
        }
}

It works.

In theory a new version of Lime/OpenFL should be released and you don’t need to do all these things manually.
Anyway, happy it works now!