Why won't my Admob Ads show up in my android application?
I have made an application for the Android Market and I tried to include an Ad in it using Admob. I have everything set up correctly, but the ad doesn't show up no matter what I do. If I check the Admob Marketplace I can see that there were a lot of requests sent and I got a good fillrate, too, but my ads simply do not show up in my program, as if they were invisible.
The AdView appears if I am in the graphical XML designer, but just won't show up when I run the program, although as I said, it sends a request. I would really appreciate it if you could help me out! :)
By the way, here is the main code of the AdView(I tried to add it using Java too, but it didn't show up either):
开发者_JAVA百科<com.google.ads.AdView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/ad"
ads:loadAdOnCreate="true"
ads:adSize="BANNER"
ads:adUnitId="MyIdHere">
</com.google.ads.AdView>
I found out that the padding of my layout prevented the Adview from appearing. Removing the padding fixes the problem!
-- answer by Calin
精彩评论