• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps error com.google.android.gms.ads cannot be resolved

3245

Lurker
Mar 27, 2015
8
0
Hello
i have a project in eclips...
when i open it, and selcect new > project > android project from existing code, it open without errors, and i can export APK easly...
but when i want make a changes in name or code, i see below errors:
1942411cff3e4e5d98508cf9d7636197.png


i did below action,but not solved yet:
click right on properties , build target, and i mark Google API and not solved...

click right on properties, java build path, and add google play service, but not solved

note: after all works, i clean project but still errors occurred.

when i click on errors, it going on below cods:

Code:
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;

and i remove them, and still errors occured.

kindly please help me.

thanks.
 
Thanks for your reply,
but this link teach how to add admob into project,

i dont need it,
its a prepare project, and its not for me, and i just want make few changes on it...
even i can remove admob from it...

now can you tell me what is problem exactly? admob installed in project incomplete?

note: I'm newbie in android coding...
 
Upvote 0
Hello
i have a project in eclips...
when i open it, and selcect new > project > android project from existing code, it open without errors, and i can export APK easly...
but when i want make a changes in name or code, i see below errors:
1942411cff3e4e5d98508cf9d7636197.png


i did below action,but not solved yet:
click right on properties , build target, and i mark Google API and not solved...

click right on properties, java build path, and add google play service, but not solved

note: after all works, i clean project but still errors occurred.

when i click on errors, it going on below cods:

Code:
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;

and i remove them, and still errors occured.

kindly please help me.

thanks.
You aren't using a hosts blocker, right? I have the SDK installed on my Windows PC and if I reference ads in the system or on browsers, it redirects them to 127..0.0.1. If you use a mobile hotspot whose host files were edited it will also cause this to occur.

Try reverting the hosts file and try running those ads again.
 
Last edited:
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones