当我按照说明添加广告到由XML我的应用程序,我得到了以下错误:
When I followed the instructions to add an ad into my app by xml, I got the following errors:
Description Resource Path Location Type
error: No resource identifier found for attribute 'adSize' in package 'com.google.example' main.xml /HelloWorld/res/layout line 12 Android AAPT Problem
Description Resource Path Location Type
error: No resource identifier found for attribute 'adUnitId' in package 'com.google.example' main.xml /HelloWorld/res/layout line 12 Android AAPT Problem
我做编辑的main.xml
添加 attrs.xml
文件,但是编译器不喜欢它
I did edit the main.xml
, add attrs.xml
file but the compiler didn't like it.
替换 / RES /
与 / lib目录/
在自定义布局nampespace 的xmlns:机器人=http://schemas.android.com/apk/res/android
为
replace /res/
with /lib/
in your custom layout nampespace xmlns:android="http://schemas.android.com/apk/res/android"
will be
的xmlns:yourApp =http://schemas.android.com/apk/lib/com.yourAppPackege.yourClass
我希望它帮助:)
上一篇:ClassNotFoundException的:没有找到类" com.google.android.gms.ads.AdView"没有找到、com、QUOT、ClassNotFou
下一篇:批量插入记录到活动记录表批量