Android 我能';不要在我的应用程序中使用adMob
当我添加代码时Android 我能';不要在我的应用程序中使用adMob,android,admob,Android,Admob,当我添加代码时 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/LinearLayout1" android:layout_width="fill_par
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LinearLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#F0F8FF"
android:orientation="vertical" >
<ListView
android:id="@+id/lvHienThi"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
ads:adSize="BANNER"
ads:adUnitId="@string/ad_unit_id" />
它显示:“在包“…”中找不到属性“adSize”的资源标识符”
我怎样才能修好它?请帮帮我。谢谢大家! 在自定义布局nampespace中将/res/替换为/lib/
xmlns:android="http://schemas.android.com/apk/res/android"
将是
xmlns:yourApp="http://schemas.android.com/apk/lib/com.yourAppPackege.yourClass"
我希望它能有所帮助:)而不是
xmlns:ads="http://schemas.android.com/apk/res-auto"
加
用实际的包名替换“your.package.name”hi sakikumar,我在下面的评论中发布了新的错误。请检查一下,帮帮我。非常感谢。您好,sakikumar,谢谢。我试过了,但它告诉我:您好,我试过了。我发现了一个新问题:请帮帮我。非常感谢。
xmlns:ads="http://schemas.android.com/apk/res/your.package.name"