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
I did edit the main.xml
, add attrs.xml
file but the compiler didn't like it.
Replace /res/
with /lib/
in your custom layout nampespace.
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"
I hope it helps.