Mehdi Mehdi -4 years ago 172
Java Question

(android studio mobile app project) Errors: package com.google.ads does not exist

hello, maybe you can help a noob here, thanks for the time

excuse my bad english, i recently got into a game project (reskinning) and couldn't compile on android studio ==> 9 errors;

error: package com.google.ads does not exist// import com.google.ads.AdRequest;
error: package com.google.ads does not exist// import com.google.ads.AdSize;
error: package com.google.ads does not exist// import com.google.ads.AdView;
error: cannot find symbol class AdView// AdView ad = new AdView(this, AdSize.BANNER, "xxxxxxxxxxxxx");
error: cannot find symbol class AdView// AdView ad = new AdView(this, AdSize.BANNER, "xxxxxxxxxxxxx");
error: cannot find symbol variable AdSize// AdView ad = new AdView(this, AdSize.BANNER, "xxxxxxxxxxxxx");
error: cannot find symbol class AdRequest// AdRequest request = new AdRequest();
error: cannot find symbol class AdRequest// AdRequest request = new AdRequest();


enter image description here

Answer Source

Did you specify google play services in gradle.build?

Compile 'com.google.android.gms:play-services:+'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download