AdMob 4.3.1 adds it does not show (there is no AdMob ID yet (for test only), cannot get ViewWidth)

First of all, I know that there are many questions on this topic. I searched all over the Internet, but most tutorials are about older versions of AdMob. In addition, everyone has some other solution to the problem. All of them do not work for me. I am very close to adding these test add-ons to my application. They just don't appear. I get the following errors:

02-21 21: 05: 46.457: W / webcore (14924): it is impossible to get the width view after the first layout

02-21 21: 05: 46.586: W / Ads (14924): Invalid request error: Unable to determine the type of request. Is the ad unit ID set correctly?

02-21 21: 05: 46.586: D / webviewglue (14924): nativeDestroy view: 0x685300

02-21 21: 05: 46.586: I / Ads (14924): onFailedToReceiveAd (invalid Google Ad. Request)

I don’t have an AdMob publisher ID yet, as this will be my first APP for the market (and I must first have APP in the market before I get the ID for APP). Which identifier should I use? Currently I have (testing on an Android phone):

AdRequest adRequest = new AdRequest(); adRequest.addTestDevice("9B08CXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); //adRequest.addTestDevice("037c7xxxxxxxxxxx"); (Not right, is from console) AdView adView = (AdView) this.findViewById(R.id.adView); adView.loadAd(adRequest); 

In my XML I have (because it also warns about viewWidth?). It is packaged in a larger LinearLayout file:

 <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="50dip"> <com.google.ads.AdView android:id="@+id/adView" android:layout_width="fill_parent" android:layout_height="wrap_content" ads:adSize="BANNER" ads:adUnitId="@string/admob_pub_id"/> </LinearLayout> 

I hope this question is small enough, but it still contains enough information.

Thanks in advance! Best wishes, Jos.

EDIT: I have a manifest file changed (add permissions, activity android: name = ..., android: configChanges = ...). I added the jar to the lib folder and added it to the libraries.

0
source share
2 answers

You do not need to have an application already on the market to get the publisher ID for the new application. In the URL box of the Android package, which is in the form "Add a site / application", simply enter "market: // details? Id = your.package.name". You, of course, want to replace "your.package.name" with the actual name of your application.

ViewWidth warnings are accurate, and you'll probably still see them after pasting the publisher ID.

+4
source

Referring to the following errors:

 07-26 15:51:24.046: W/webcore(842): Can't get the viewWidth after the first layout 07-26 15:51:24.871: W/Ads(842): Invalid unknown request error: Cannot determine request type. 

Is the ad unit ID set correctly?

0
source

Source: https://habr.com/ru/post/1487537/


All Articles