2017-12-05 16 views
2

私のアプリにネイティブ広告を実装しようとしています。私はすべてのステップを完了しました。私は、ad_app_install.xml、ad_content.xmlのレイアウトを追加しました。これは、ネイティブ広告をリクエストするためのコードです。Admobネイティブ広告のプロパティエラーを読み取ることができません

AdLoader.Builder builder = new AdLoader.Builder(this, "ca-app-pub-3940256099942544/2247696110"); 
     AdLoader adLoader = builder.forAppInstallAd(new NativeAppInstallAd.OnAppInstallAdLoadedListener() { 
      @Override 
      public void onAppInstallAdLoaded(NativeAppInstallAd ad) { 
       // An app install ad loaded successfully, call this method again to 
       // load the next ad. 
       mNativeAds.add(ad); 
       loadNativeAd(adLoadCount + 1); 

      } 
     }).forContentAd(new NativeContentAd.OnContentAdLoadedListener() { 
      @Override 
      public void onContentAdLoaded(NativeContentAd ad) { 
       // A content ad loaded successfully, call this method again to 
       // load the next ad. 
       mNativeAds.add(ad); 
       loadNativeAd(adLoadCount + 1); 
      } 
     }).withAdListener(new AdListener() { 
      @Override 
      public void onAdFailedToLoad(int errorCode) { 
       // A native ad failed to load. Call this method again to load 
       // the next ad in the items list. 
       Log.e("MainActivity", "The previous native ad failed to load. Attempting to" 
         + " load another."); 
       loadNativeAd(adLoadCount + 1); 
      } 
     }).build(); 

私はAdmobの仮IDを使用しています。しかし、私がアプリケーションを実行するたびにエラーが発生していますI/Ads: Received log message: <Google:HTML> Cannot read property 'tracking_urls_and_actions' of undefined 解決方法が見つからない場合は、このエラーを検索しました。

答えて

0

Playサービスで新しいエミュレータでAdMobコードラップを実行したときにもこのエラーが発生しました。実際のデバイスで実行してもエラーは発生しませんでした。