1. Download our Official Android App: Forums for Android!

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

Discussion in 'Android Development' started by 3245, Jun 28, 2016.

  1. 3245

    3245 Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    8
    Joined:
    Mar 27, 2015

    Mar 27, 2015
    8
    0
    5
    Male
    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:
    [​IMG]

    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 (Text):
    1. import com.google.android.gms.ads.AdListener;
    2. import com.google.android.gms.ads.AdRequest;
    3. import com.google.android.gms.ads.AdView;
    and i remove them, and still errors occured.

    kindly please help me.

    thanks.
     

    Advertisement

  2. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #17
    Points:
    1,488
    Posts:
    6,715
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    6,715
    9,441
    1,488
    Male
    Software developer
    South West of England
    Bg260 and 3245 like this.
  3. 3245

    3245 Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    8
    Joined:
    Mar 27, 2015

    Mar 27, 2015
    8
    0
    5
    Male
    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...
     
  4. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #17
    Points:
    1,488
    Posts:
    6,715
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    6,715
    9,441
    1,488
    Male
    Software developer
    South West of England
    So what is in your build.gradle file?
     
  5. 3245

    3245 Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    8
    Joined:
    Mar 27, 2015

    Mar 27, 2015
    8
    0
    5
    Male
    i just have this files...
    and there is no gradle file
    [​IMG]
     
  6. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #17
    Points:
    1,488
    Posts:
    6,715
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    6,715
    9,441
    1,488
    Male
    Software developer
    South West of England
    Are you trying to reverse engineer and modify an existing app?
     
  7. 3245

    3245 Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    8
    Joined:
    Mar 27, 2015

    Mar 27, 2015
    8
    0
    5
    Male
    no, i get project from owner, without build.gradle this source is useless?
     
  8. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #17
    Points:
    1,488
    Posts:
    6,715
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    6,715
    9,441
    1,488
    Male
    Software developer
    South West of England
    So what's stopping you from going to the owner for some advice on building the project?
     
  9. 3245

    3245 Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    8
    Joined:
    Mar 27, 2015

    Mar 27, 2015
    8
    0
    5
    Male
    he is not responsive thir email!
     
  10. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #17
    Points:
    1,488
    Posts:
    6,715
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    6,715
    9,441
    1,488
    Male
    Software developer
    South West of England
  11. 3245

    3245 Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    8
    Joined:
    Mar 27, 2015

    Mar 27, 2015
    8
    0
    5
    Male
    Note: this is eclips project, i heard eclips project dont need build.gradle
    and i heard android studio need build.gradle

    its correct?
     
  12. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #17
    Points:
    1,488
    Posts:
    6,715
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    6,715
    9,441
    1,488
    Male
    Software developer
    South West of England
  13. eshieldsvx4

    eshieldsvx4 Well-Known Member
    Rank:
    None
    Points:
    53
    Posts:
    99
    Joined:
    Feb 16, 2014

    Feb 16, 2014
    99
    41
    53
    Male
    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.
     
    #13 eshieldsvx4, Jul 11, 2016
    Last edited: Jul 11, 2016

Share This Page

Loading...