コンパイラはあなたのmyapp:
admobsdk:
代わりに使用してください。
コード例を参照してください。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:admobsdk="http://schemas.android.com/apk/res/joke.content"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView android:id="@+id/photo" android:src="@drawable/joker"
android:layout_width="wrap_content" android:layout_height="wrap_content" />
<RelativeLayout android:layout_height="wrap_content"
android:layout_width="wrap_content">
<TextView android:id="@+id/title" android:text=""
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="24sp" android:textColor="@color/css_a"
android:layout_centerInParent="true" android:layout_alignParentTop="true"></TextView>
</RelativeLayout>
<ScrollView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_weight="1">
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="" android:id="@+id/content"
android:textSize="18sp" />
</ScrollView>
<RelativeLayout android:layout_height="wrap_content"
android:layout_width="fill_parent">
<Button android:text="下一篇" android:id="@+id/next"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_marginRight="15dip"
android:textSize="22sp"></Button>
</RelativeLayout>
<com.admob.android.ads.AdView android:id="@+id/ad"
android:layout_width="fill_parent" admobsdk:backgroundColor="#000000"
admobsdk:textColor="#FFFFFF" admobsdk:refreshInterval="60"
admobsdk:keywords="笑话" android:layout_height="wrap_content"
admobsdk:testing="false" admobsdk:isGoneWithoutAd="false" />
</LinearLayout>
前のコードに次の行があることを確認してください。
xmlns:admobsdk="http://schemas.android.com/apk/res/joke.content"
attrs.xml (res/values フォルダー内) ファイルは次のようになっていますか?
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<declare-styleable name="com.admob.android.ads.AdView">
<attr name="backgroundColor" format="color" />
<attr name="primaryTextColor" format="color" />
<attr name="secondaryTextColor" format="color" />
<attr name="keywords" format="string" />
<attr name="refreshInterval" format="integer" />
</declare-styleable>
</resources>
そうでない場合は、res/values フォルダーに attrs.xml という名前の xml ファイルを作成し、このコードをそこにコピーします。
joke.content
あなたのパッケージ名です。パッケージ名に変更することを忘れないでください。