InterstitialAd is not recognized as a class of Android Studio and libgdx

I would like to add interstitial ads to my application , and I have done the following:

1. File -> Project Structure -> Ads: i have flag adMob

2. my gradle.build:

project(":android") {
    apply plugin: "android"
    apply plugin: 'com.google.gms.google-services'

    configurations { natives }

    dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
        compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
        compile 'com.google.android.gms:play-services:8.4.0'
    }
}

3. i have add the code from this tutorial

but i have the problem...when i add the library, don't work....:

I do not add the libraries to recognize the class ... how do I fix ?

Answers


Try adding the following:

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

to the bottom of build.gradle file in the android project (not the one under core project).


Need Your Help

How to close fancybox within an ajax popup with another version of jquery loaded?

ajax fancybox jquery

I am having an issue closing a fancybox popup when jquery is included within the popup page (i'm using AJAX and including an external php page within the popup). The fancybox is setup as follows:

Recorded Audio is not clear

android audio

I am recording the audio in Android using AudioRecorder, I have issue that I recorded a song but pitch and running of frequency is too fast that result to bad sound. How can I fix this ?