Uncaught ReferenceError: AFMA_getSdkConstants is not defined

前端 未结 5 1011
醉话见心
醉话见心 2020-12-17 04:13

I\'m trying to add an AdMob ad to my android application but whenever I\'m opening the activity that is supposed to display the ad I get this error:

I/Ads(11         


        
5条回答
  •  天涯浪人
    2020-12-17 05:09

    I had this error too and solved by loading the ad in separate thread (in ICS you're not allowed to perform network operation in the main thread)

    (new Thread() {
                    public void run() {
                         Looper.prepare();
                        adView.loadAd(new AdRequest());
                    }
                }).start();
    

提交回复
热议问题