Help with this error when trying to build

Hello I need to update my app and my game and I have encountered this error when trying to do the build.

First the data: I have a new Windows 10 Home 64bit PC. The Microsoft Visual C++ 2015-2019 was installed which solves the problem that the Solar2d console does not open. I have installed the JDK version that is redirected from the CoronaSDK page (jdk-8u261-windows-i586)

Solar2D version 2020.3620

After resuming my projects and a hard task of recovering all the data from the old PC, I cannot build my game due to the following error

14:53:05.887  * What went wrong:
14:53:05.887  Execution failed for task ':App:processReleaseManifest'.
14:53:05.887  > Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [com.google.android.gms:play-services-ads:19.3.0] C:\Users\ruben\.gradle\caches\transforms-2\files-2.1\88db18d678114778d670af1201a8b7a0\jetified-play-services-ads-19.3.0\AndroidManifest.xml as the library might be using APIs not available in 15
14:53:05.887    	Suggestion: use a compatible library with a minSdk of at most 15,
14:53:05.887    		or increase this project's minSdk version to at least 16,
14:53:05.887    		or use tools:overrideLibrary="com.google.android.gms.ads.impl" to force usage (may lead to runtime failures)

It is the first time that I have this type of error. The errors that I found were solved updating the JDK. I will appreciate the help you can give me.

Thanks
DoDi

The answer is literally in the error message. :slight_smile:

I canā€™t understand. The version that I have in google play is version 15 of my game and now Iā€™m going to build the build to 16.

This is what happens sometimes when you update your apps. When plugins or other dependencies get updated then their requirements may change.

In this case, if you wish to use Google Mobile Ads Android SDK and/or Firebase Ads SDK (e.g. AdMob) then theyā€™ll require com.google.android.gms:play-services-ads:19.3.0 which means that they require features that simply donā€™t exist in Android SDK 15. So, unless you update the minSdkVersion, you canā€™t use those services.

You can read this thread about your options:

The only plug-in I use is Appodeal. I know Appodeal uses Admob but I have the child table fine as per the appodeal plugin tutorial from the Corona/Solar2d SDK page.

Will there be any warning or new rule that I ignore or is not published in the Appodeal documentation?

Thanks
DoDi

The min version for Admob is now SDK 16. The min version of Solar2d continues to be SDK 15. Appodeal contains Admob. It is not a new rule. SDKs have always had min version requirements. At this point, most SDKs require at least 16 and I have seen some that require even 19 (Mopub for example).

So your options are:

  1. Set the min SDK to 16.
  2. Override the min SDK of Admob.

Both are detailed in that thread I posted.

So I have to go solar2d native, download android SDK, create a firebase account that I donā€™t want, follow all the guide in the link you give me and then? In the guide it doesnā€™t say how to set the min SDK to 16 or override Admob. Sorry, but for those of us who are not expert programmers this has a higher level of difficulty.

I really appreciate your help, donā€™t misinterpret my words, Iā€™m just confused.

Thanks
DoDi

Nope. Add one of these to the Android section of the build settings:

manifestChildElements = 
    {
        -- Array of strings
        [[
        <uses-sdk tools:overrideLibrary="com.google.android.gms.ads.impl" />
        ]]
    },

or

minSdkVersion = ā€œ16ā€,

2 Likes