简体   繁体   中英

'Hello Xamarin Forms' Android App - how to get it to work targeting JellyBean 18 (4.3)?

I need to target the Android JellyBean (4.3) platform for a project. Having Xamarin Forms installed, I download the 4.3 SDK , create a new Xamarin Forms PCL project. Right-click the .Droid project and set Compile, Minimum and Target Android versions to Android 4.3 ( API Level 18 - Jelly Bean ). Hit build and get this compilation error:

Error 1 No resource identifier found for attribute 'touchscreenBlocksFocus' in package 'android' E:\\Users\\Toby\\Documents\\Visual Studio 2013\\Projects\\M3SLM10\\TestM3\\M3slm10\\M3slm10\\M3slm10.Droid\\obj\\Debug\\resourcecache\\2FCCE52AFB6F854A55FA951FA3C83F6E\\res\\layout\\abc_screen_toolbar.xml 28 M3slm10.Droid

How do I resolve this error?

You should only be setting your Minimum SDK to API 18. Your Compile SDK or TargetFramework should be set to the latest API installed (API 23). That way any resources can be compiled for Xamarin.Forms.

There's a great resource on this here:

http://redth.codes/such-android-api-levels-much-confuse-wow/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM