Android错误:找不到包含'com.google.example'包的属性'adSize'的资源标识符
问题描述:
我在Xamarin Visual Studio中添加admob时出现错误 我在*中找到答案,但我无法理解如何做到这一点 error: No resource identifier found for attribute 'adSize' in package 'com.google.example' \t main.xml 例如这个答案: 在您的自定义布局nampespace中将/res/
替换为/lib/
。Android错误:找不到包含'com.google.example'包的属性'adSize'的资源标识符
xmlns:android="http://schemas.android.com/apk/res/android" in your case, would be:
xmlns:yourApp="http://schemas.android.com/apk/lib/com.yourAppPackege.yourClass"
我希望它有帮助。
我不知道该怎么做?
答
走过去,你发布的链接,我相信这些都是步骤,你应该做的:
- 找到,你把你的广告在xml文件
- 找到这样一个标签:
xmlns:ads="http://schemas.android.com/apk/res/com.google.example"
- 变化com.google.example到您的项目包的名称。因此,例如,如果你的包的名字是com.IR.Ad那么标签更改为:
xmlns:ads="http://schemas.android.com/apk/res/com.IR.AD"
并为您在此处引用的具体的答案:
变化
xmlns:android="http://schemas.android.com/apk/res/android
至
xmlns:app="http://schemas.android.com/apk/lib/com.yourAppPackege.yourClass"
其中yourAppPackage应该是您的项目包名称,yourClass应该是您正在实施广告的类
Bro这是githup中的项目,可以下载它并解决问题并上传项目egain以了解? https://github.com/IhabZaidi/XamarinAdmob –