Uncaught ReferenceError: AFMA_getSdkConstants is not defined

前端 未结 5 988
醉话见心
醉话见心 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 04:44

    It's a connection problem. I fixed it by uninstalling my ad blocker...

    0 讨论(0)
  • 2020-12-17 04:45

    Simply just check all of your internet connections. My Laptop had internet while the phone hadn't. I did try to connect to the web server on my laptop and it was working fine. so after trying heaps with the phone, I rebooted my DSL router. and everything is fine and back to normal then.

    0 讨论(0)
  • 2020-12-17 04:51

    Check /etc/hosts file. Many custom roms has adblock entries ...

    0 讨论(0)
  • 2020-12-17 05:03

    I had this problem when moving between networks and leaving the emulator running.

    I discovered that simply restarting the emulator once I was connected to the new network solved the problem.

    0 讨论(0)
  • 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();
    
    0 讨论(0)
提交回复
热议问题