How do I add AdMob ads to the app?

Good afternoon! I wish to add AdMob to my game, but I’m having some problems. After adding the AdMob plugin, according to the Solar 2 D Documentation instructions, my application does not compile. Mistake:

FAILURE: Build failed with an exception.
13:43:50.053
13:43:50.053 * What went wrong:
13:43:50.053 Execution failed for task ‘:App:processReleaseManifest’.
13:43:50.053 > 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******.gradle\caches\transforms-2\files-2.1\8dcbacb00fac34f40fdeb9c05fc59259\jetified-play-services-ads-19.3.0\AndroidManifest.xml as the library might be using APIs not available in 15
13:43:50.053 Suggestion: use a compatible library with a minSdk of at most 15,
13:43:50.053 or increase this project’s minSdk version to at least 16,
13:43:50.053 or use tools:overrideLibrary=“com.google.android.gms.ads.impl” to force usage (may lead to runtime failures)
13:43:50.053

I searched for information about this on various forums, but did not find it, maybe someone will tell me what to do with it.

I solved the problem myself) it is necessary to add in the build file: minSdkVersion = 16

1 Like