Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid - Admob issues!
    text
    copied!<p>So I'm trying to just add a simple ad to my app using admob. I've followed the tutorial with the SDK but am getting stuck at one error.</p> <p>Here's the error:</p> <pre><code>Multiple annotations found at this line: - ERROR No resource identifier found for attribute 'secondaryTextColor' in package 'man.utd.headlines.man.utd' - ERROR No resource identifier found for attribute 'primaryTextColor' in package 'man.utd.headlines.man.utd' - ERROR No resource identifier found for attribute 'backgroundColor' in package 'man.utd.headlines.man.utd' </code></pre> <p>so I figure it must be a problem with my package name but as far as I can see everything is OK. </p> <p>In my layout file I have the following:</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:myapp="http://schemas.android.com/apk/res/man.utd.headlines.man.utd" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" &gt; </code></pre> <p>But the package name seems correct:</p> <pre><code>package man.utd.headlines.man.utd; </code></pre> <p>Any ideas? It's very frustrating!</p> <p>I have also checked my manifest and have tried with this package name but it still doesn't work:</p> <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="man.utd.headlines" </code></pre> <p>Any help is greatly appreciated.</p> <p>UPDATE: Solved by changing package names to make them more consistant - they mnust be exactly the same in main class and manifest!</p> <p>New Problem: Ads won't display!</p> <p>Heres my layout file:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; </code></pre> <p></p> <pre><code>&lt;WebView android:id="@+id/webview" android:layout_width="fill_parent" android:layout_height="fill_parent" /&gt; &lt;com.admob.android.ads.AdView android:id="@+id/ad" android:layout_width="fill_parent" android:layout_height="100px" myapp:backgroundColor="#000000" myapp:primaryTextColor="#FFFFFF" myapp:secondaryTextColor="#CCCCCC" /&gt; </code></pre> <p></p> <p>Any ideas? Any help greatly appreciated :).</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