正如标题所述,即使我非常有信心在 Android Manifest 中获得正确的代码,我也会收到该特定错误。我已经检查了常见的错误,比如不小心输入了“users”而不是“uses”,并确保我使用了单数的“permission”。尽管我尽了最大努力,但我仍然收到此错误。我希望你们中的一个人能指出我遗漏的东西。
这是 Android Manifest 的相关部分
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" >
</activity>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
这是我应该展示测试广告的整个布局。相关视图位于最底部附近。
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".HomeActivity" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:layout_weight=".5"
tools:context=".HomeActivity">
<!-- Space reserved for buttons at top of screen -->
</LinearLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:layout_weight="1"
tools:context=".HomeActivity">
<Button
android:id="@+id/btnAddRevenue"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:layout_alignParentLeft="true"
android:text="@string/btnAddRevenue_Text" />
<Button
android:id="@+id/btnAddExpense"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:layout_alignParentRight="true"
android:text="@string/btnAddExpense_Text" />
</LinearLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:layout_weight="5"
tools:context=".HomeActivity">
<ListView
android:layout_height="fill_parent"
android:layout_width="fill_parent" />
<!-- <TextView
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:text="@string/fillerText" /> -->
</LinearLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:layout_weight=".5"
tools:context=".HomeActivity">
<!-- Space reserved for ads -->
<com.google.ads.AdView
android:id="@+id/adHome_bottomBanner"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
ads:adUnitId="@string/adId_bottomBanner"
ads:adSize="BANNER"
ads:testDevices="TEST_EMULATOR, TEST_DEVICE_ID"
ads:loadAdOnCreate="true" />
</LinearLayout>