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.
Here's the error:
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'
so I figure it must be a problem with my package name but as far as I can see everything is OK.
In my layout file I have the following:
<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" >
But the package name seems correct:
package man.utd.headlines.man.utd;
Any ideas? It's very frustrating!
I have also checked my manifest and have tried with this package name but it still doesn't work:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="man.utd.headlines"
Any help is greatly appreciated.
UPDATE: Solved by changing package names to make them more consistant - they mnust be exactly the same in main class and manifest!
New Problem: Ads won't display!
Heres my layout file:
<?xml version="1.0" encoding="utf-8"?>
<WebView
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<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" />
Any ideas? Any help greatly appreciated :).