I am having problems adding Banner Ads to my Android App. I had done the app using Version 27 SDK. I followed the instruction on adding Banner ads, when I added the "implementation 'com.google.android.gms:play-services-ads:20.6.0'" in build.gradle, Android Studio flagged an error that SDK is inadequate and needs to be upgraded to 31 or higher.
I used the Project Structure Dialog to upgrade the SDK to version 31, the IDE then highlighted the dependencies that needed upgrading which I used the "Suggestion" tab to upgrade, tried to run the code and it won't run.The error on build terminal is shown below Build terminal error
Please can anyone help me solve this problem? Thanks in advance for your time.
Thanks to @Mikahli, I was able to go past the dependency issue but I am now getting errors on initialisation. I copied the code in the documentation, please see Initialisation Errors. Thanks in advance to everyone involved.