错误:未找到属性“adSize”在包资源标识符“com.google.example”main.xml中 [英] error: No resource identifier found for attribute 'adSize' in package 'com.google.example' main.xml
本文介绍了错误:未找到属性“adSize”在包资源标识符“com.google.example”main.xml中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我按照说明添加广告到由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
我希望它帮助:)
这篇关于错误:未找到属性“adSize”在包资源标识符“com.google.example”main.xml中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文