rendering problems in android studio - com.android.gms.ads.adview

586 views Asked by At

I'm spending already 2 days to figure what is the problem with this Error.

this is the error in my Activity.xml:

rendering problems could not be found com.android.gms.ads.adview

and this is what i have in code:

 <com.google.android.gms.ads.AdView
        android:id="@+id/adView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_alignParentBottom="true"
        ads:adSize="BANNER"
        ads:adUnitId="@string/banner_ad_unit_id">
    </com.google.android.gms.ads.AdView>

i followed this guide: https://developers.google.com/admob/android/quick-start

this is my dependencies :

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.google.android.gms:play-services:6.1.+'
}

please Help

1

There are 1 answers

0
David On

It's an old question, but I still encountered this issue while using Firebase.

So I hope it will save some time for you. To fix it:

  1. Go to Firebase official site and check the latest version. (10.0.1 right now)
  2. Update your app gradle file according to this version number, for example:

    compile 'com.google.firebase:firebase-core:10.0.1'

    compile 'com.google.firebase:firebase-crash:10.0.1'

    compile 'com.google.firebase:firebase-ads:10.0.1'

  3. If the gradle doesn't sync / Failed to resolve. Open SDK Manager and update Google Repository for the last version possible.