• 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
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...
 
Are you trying to reverse engineer and modify an existing app?
 
So what's stopping you from going to the owner for some advice on building the project?
 
Note: this is eclips project, i heard eclips project dont need build.gradle
and i heard android studio need build.gradle

its correct?
 
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:
Back
Top Bottom