Error adding Google AdMob on Android libraries - LIBGDX project

Viewed 530

I would like to add the Google library to my project libgdx in Android Studio. Currently I have done:

  1. opened the SDK manager and downloaded play-services from the SDK manager,
  2. added the compile string in build.gradle:

compile 'com.google.android.gms:play-services:8.4.0'

  1. Clicked on File -> Project Structure -> choose the project and added the library play-services 8.4.0.

When I do the sync it gives me this error:

enter image description here

If I click on Install and sync repository project I get an error, this:

enter image description here

Another test:

 import com.google.android.gms.ads.AdListener;
 import com.google.android.gms.ads.AdRequest;
 import com.google.android.gms.ads.InterstitialAd;

If you manually add this library, after all the steps listed... I do not recognize them and it always fails. How do I add? Thank you.

also tried to Add Google Play Services to my project, but with unsuccess :(

My goal is to use AdMob banner.

1 Answers
Related