In one of the guides for the implementation of EdMob ads in applications on LibGdx it is written that you need to add such lines to bild.gradle (android module)

dependencies { compile 'com.google.android.gms:play-services-ads:10.2.4' } 

after they are added and the project is synchronized, an error occurs (screenshot below)

How to add google play services without errors?

    2 answers 2

     repositories { mavenCentral() } dependencies { compile 'com.google.android.gms:play-services-ads:10.0.1' } 
    • one
      The answer will become much clearer for a wider audience if you add explanations to it, what, where and why is needed in this configuration fragment. - ߊߚߤߘ

    The fact is that the library requires at least 14 version of the Android API. This is stated in the "how to start" instructions. Also in this manual it is recommended to use the latest version of the AdMob library. Now this is the version:

     allprojects { repositories { jcenter() maven { url "https://maven.google.com" } // или google() для Android Studio 3.x } } dependencies { compile 'com.google.android.gms:play-services-ads:15.0.0' }