Error onRewardedVideoAdFailedToLoad Admob Interstitial rewarded Android Studio

1,445 views
Skip to first unread message

byJS93

unread,
Nov 6, 2016, 3:36:24 PM11/6/16
to Google Mobile Ads SDK Developers
Hi I am implementing Admob Interstitial rewarded in Android Studio but I get this error when I want to load the ad: onRewardedVideoAdFailedToLoad.

I leave you link the code catches and admob settings.

   
 package com.android.proyect;


   
import com.google.android.gms.ads.AdListener;
   
import com.google.android.gms.ads.AdRequest;
   
import com.google.android.gms.ads.AdView;
   
import com.google.android.gms.ads.InterstitialAd;
   
import com.google.android.gms.ads.reward.RewardedVideoAd;


   
import static android.graphics.BitmapFactory.decodeResource;
   
import static android.view.Window.FEATURE_LEFT_ICON;


   
public class Welcome extends AppCompatActivity{
       


       
private RewardedVideoAd mRewardedVideoAd;
       
private static final String AD_UNIT_ID = "ca-app-pub-000000000000000/00000000"; //My code


       
@Override
       
public void onCreate(Bundle savedInstanceState)
       
{
           
super.onCreate(savedInstanceState);
           
// Get the view from singleitemview.xml
            setContentView
(R.layout.activity_welcome);


            probarboton
= (Button) findViewById(R.id.button4);


           
//Anuncio probar video
            mRewardedVideoAd
= MobileAds.getRewardedVideoAdInstance(this);
            mRewardedVideoAd
.setRewardedVideoAdListener(new RewardedVideoAdListener()
           
{


               
@Override
               
public void onRewardedVideoAdLoaded()
               
{
                   
Toast.makeText(Welcome.this, "onRewardedVideoAdLoaded", Toast.LENGTH_SHORT).show();
               
}


               
@Override
               
public void onRewardedVideoAdOpened()
               
{
                   
Toast.makeText(Welcome.this, "onRewardedVideoAdOpened", Toast.LENGTH_SHORT).show();
               
}


               
@Override
               
public void onRewardedVideoStarted()
               
{
                   
Toast.makeText(Welcome.this, "onRewardedVideoStarted", Toast.LENGTH_SHORT).show();
               
}


               
@Override
               
public void onRewardedVideoAdClosed()
               
{
                   
Toast.makeText(Welcome.this, "onRewardedVideoAdClosed", Toast.LENGTH_SHORT).show();
                   
// Preload the next video ad.
                    loadRewardedVideoAd
();
               
}


               
@Override
               
public void onRewarded(RewardItem rewardItem)
               
{
                    textView4
.setText(String.format(Locale.getDefault(),"you got %d %s!", rewardItem.getAmount(), rewardItem.getType()));
               
}


               
@Override
               
public void onRewardedVideoAdLeftApplication()
               
{
                   
Toast.makeText(Welcome.this, "onRewardedVideoAdLeftApplication", Toast.LENGTH_SHORT).show();
               
}


               
@Override
               
public void onRewardedVideoAdFailedToLoad(int i)
               
{
                   
Toast.makeText(Welcome.this, "onRewardedVideoAdFailedToLoad", Toast.LENGTH_SHORT).show();
               
}
           
});


            probarboton
.setOnClickListener(new View.OnClickListener()
           
{
               
public void onClick(View arg0)
               
{
                   
Log.i("probar","video");
                   
System.out.println("click boton probar video");
                   
if (mRewardedVideoAd.isLoaded()) {
                        mRewardedVideoAd
.show();
                   
}
               
}
           
});


            requestNewInterstitial
();
            loadRewardedVideoAd
();
       
}


       
private void loadRewardedVideoAd() {
           
AdRequest adRewardRequest = new AdRequest.Builder()
                   
.build();
            mRewardedVideoAd
.loadAd(AD_UNIT_ID, adRewardRequest );
       
}


   
}



build.gradle proyect

   
 dependencies {
        classpath
'com.android.tools.build:gradle:2.2.2'
        classpath
'com.google.gms:google-services:3.0.0'


       
// NOTE: Do not place your application dependencies here; they belong
       
// in the individual module build.gradle files
   
}


build.gradle app

       
dependencies {
        compile fileTree
(include: ['*.jar'], dir: 'libs')
        compile
'com.android.support:appcompat-v7:24.2.1'
        compile
'com.android.support:design:24.2.1'
        compile
'com.android.support:support-v4:24.2.1'
        compile
'com.koushikdutta.ion:ion:2.1.9'
        compile
'com.android.support:support-vector-drawable:24.2.1'
        compile
'com.github.snowdream.android:smartimageview:0.0.2'
        testCompile
'junit:junit:4.12'
        compile
'com.google.android.gms:play-services-ads:9.4.0'
        compile
'com.google.firebase:firebase-ads:9.4.0'
        compile
'com.google.firebase:firebase-core:9.4.0'
        compile
'com.google.firebase:firebase-messaging:9.4.0'
        compile
'com.squareup.okhttp3:okhttp:3.4.1'
        compile files
('libs/UnityAdsAdapter.jar')
   
   
}
    apply plugin
: 'com.google.gms.google-services'




Admob settings



Unity Ads setting




Error LogCat

   
 I/Ads: Starting ad request.
    W
/Ads: There was a problem getting an ad response. ErrorCode: 0
    W
/Ads: Failed to load ad: 0


Code Layout 

   
 <?xml version="1.0" encoding="utf-8"?>
   
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
   
xmlns:app="http://schemas.android.com/apk/res-auto"
   
xmlns:tools="http://schemas.android.com/tools"
   
xmlns:circular="http://schemas.android.com/apk/res-auto"
   
xmlns:ads="http://schemas.android.com/apk/res-auto"
   
android:layout_width="match_parent"
   
android:layout_height="match_parent"
   
app:layout_behavior="@string/appbar_scrolling_view_behavior"
   
tools:context="com.badwolf.satoshimaker.Welcome"
   
tools:showIn="@layout/activity_welcome">


   
<Button
   
android:text="Button"
   
android:layout_width="wrap_content"
   
android:layout_height="wrap_content"
   
android:layout_below="@+id/ReclaimBit"
   
android:layout_toRightOf="@+id/history"
   
android:layout_toEndOf="@+id/history"
   
android:layout_marginLeft="15dp"
   
android:layout_marginStart="15dp"
   
android:id="@+id/button4" />


   
</RelativeLayout>

Veer Arjun Busani(Mobile Ads SDK Team)

unread,
Nov 7, 2016, 12:30:07 PM11/7/16
to Google Mobile Ads SDK Developers
Hi there,

Can you confirm whether this is still happening? Newly created Ad Unit IDs would take a few hours to start serving live ads. While I have not found anything wrong with your implementation, can you try again with this sample app and let us know?

Thanks,
Arjun Busani
Mobile Ads SDK Team

ravi...@flowmotionentertainment.com

unread,
Mar 2, 2017, 10:09:34 AM3/2/17
to Google Mobile Ads SDK Developers
Hi Arjun,

I have been running into a similar problem with Google Admobs on iOS platform using Unity3D with newly introduced Admobs rewarded video ads. They are unable to get loaded with Admobs rewarded. I have updated GoogleAdMobsSDK to the latest version of 7.18 but still same results. Here is the message what I am getting on XCode
"2017-03-02 19:56:27.137346 sandwichFCF3[5855:2020956] <Google> Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target."

If you could please help me in this regard then it will be highly appreciated.

Thank you

Veer Arjun Busani(Mobile Ads SDK Team)

unread,
Mar 2, 2017, 10:52:47 AM3/2/17
to Google Mobile Ads SDK Developers
Hi Ravinder,

Can you send us your Ad Unit ID for us to look into? Also, make sure that you are copying all of the required SDKs and adaptors into your project and try again.

Thanks,
Arjun Busani
Mobile Ads SDK Team

ravi...@flowmotionentertainment.com

unread,
Mar 3, 2017, 5:24:04 AM3/3/17
to Google Mobile Ads SDK Developers
Hi Arjun,

Here is the ad unit id ca-app-pub-7632289950806144/1805234292.

Rewarded Ads have been working for other mediation networks like Applovin and Unity Ads. It's just the Admobs own rewarded video ads are not working.

Veer Arjun Busani(Mobile Ads SDK Team)

unread,
Mar 3, 2017, 10:52:50 AM3/3/17
to Google Mobile Ads SDK Developers
Hi Ravinder,

Currently, Reward Video ads from AdMob network are not fully supported. You can keep an eye out for our blog to know when this changes.

Thanks,
Arjun Busani
Mobile Ads SDK Team

ravi...@flowmotionentertainment.com

unread,
Mar 5, 2017, 11:57:00 PM3/5/17
to Google Mobile Ads SDK Developers
Okay thank you Arjun.
Reply all
Reply to author
Forward
0 new messages