Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
287 views
in Technique[技术] by (71.8m points)

android - AFMA_ReceiveMessage is not defined

I am integrating AdMob in my android app. The code for the add part is pretty simple and almost straight from Google Developer's guide. I am trying to implement Interstitials. The ads are showing fine but I am getting this in stackTrace in red:

E/Ads(21443): JS: Uncaught ReferenceError: AFMA_ReceiveMessage is not defined (null:1)

Can anyone tell me what it means? Is it ok to release the app with this error as it doesn't crash the app?

EDIT: I just noticed that this error is being received for a specific ad and not for the other(just getting two ads in my country for now). So maybe it's just something missing from Publisher end.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If this is the testing device you should call AddTestDevice("your tester device code you can got it from logCat when you start the App"). If not it should work fine in the production environment.

Tester :

AdView mAdView = (AdView)rootView.findViewById(R.id.adView);
Builder adRequest = new AdRequest.Builder().addTestDevice("3F166F686479332267DD2DCCD89dfwrg");
AdRequest aaa=adRequest.build();
mAdView.loadAd(aaa);

Production:

AdView mAdView = (AdView) findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...