Note that there are some explanatory texts on larger screens.

plurals
  1. POAdmob errors, can't get ads to show
    text
    copied!<p>I've been trying for days without any results to get my admobs running.. I have been following the tutorial on <a href="http://code.google.com/mobile/ads/docs/android/banner_xml.html" rel="nofollow">http://code.google.com/mobile/ads/docs/android/banner_xml.html</a> but can't seem to make it work..</p> <p>My java file:</p> <pre><code>// Look up the AdView as a resource and load a request. AdView adView = (AdView)this.findViewById(R.id.adView); adView.loadAd(new AdRequest()); </code></pre> <p>Manifest:</p> <pre><code> &lt;/activity&gt; &lt;activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation"/&gt; &lt;/application&gt; &lt;uses-permission android:name="android.permission.INTERNET"/&gt; &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/&gt; </code></pre> <p>Main.xml:</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/res/com.kai.custombutton" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;com.google.ads.AdView android:id="@+id/adView" android:layout_width="wrap_content" android:layout_height="wrap_content" ads:adUnitId="xxxxxxxxxxx" ads:adSize="BANNER"/&gt; </code></pre> <p>attrs.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;resources&gt; &lt;declare-styleable name="com.google.ads.AdView"&gt; &lt;attr name="adSize"&gt; &lt;enum name="BANNER" value="1"/&gt; &lt;enum name="IAB_MRECT" value="2"/&gt; &lt;enum name="IAB_BANNER" value="3"/&gt; &lt;enum name="IAB_LEADERBOARD" value="4"/&gt; &lt;/attr&gt; &lt;attr name="adUnitId" format="string"/&gt; &lt;/declare-styleable&gt; &lt;/resources&gt; </code></pre> <p>I've added the admob sdk 4.0.4 also.. If anyone have a working code I would be very pleased if I could use it or if anyone could help me out!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload