AndroidでGoogle Admobを使うために「Google Play Services」を追加すると「touchscreenBlocksFocusが見つからない」という内容のエラーが出る場合の対応方法メモです。
[スポンサードリンク]
第1弾はこちら⇒
【Xamarin】GooglePlayServices追加で「unzip~」エラー
概要
現象としては「Google Play Services」を追加してリビルドすると「abc_screen_toolbar.xml」で「Error APT0000: No resource identifier found for attribute `touchscreenBlocksFocus` in package `android` (APT0000)」というエラーが出ます。
対応方法について、以下のXamarinフォーラム(英語)を参考にさせていただきました!
https://forums.xamarin.com/discussion/41028/no-resource-identifier-found-for-attribute-touchscreenblocksfocus-with-google-play-services
対応方法
- XamarinStudioのソリューションからAndroidのプロジェクトを右クリックして「オプション」を開きます
- 「プロジェクトオプション」が開くので「ビルド」タブの「Android Application」を選択します。
- 「Target Android version」を「Override - Android 5.0(API level 21)」を選択します。
- 以上です。
これで「全て再ビルド」すれば通るはずです。