2
votes

I have Visual Studio Community Edition 2017 (Version 15.4.1) with Xamarin 4.7.10.22 and the Android SDK for 4.4.2 (API 19) installed

I create a new Cross Platform App (Xamarin) and select

UI Technology -> Xamarin.Forms

Code Sharing Strategy -> Shared Project

I compile and build this project and it builds correctly. (By default the project is using the latest platform (in my case 8.0 Oreo))

In Visual Studio 2017 UI has changed slightly and now when I right click Android project and choose properties -> Application -> I have only this option to select.

"Compile using Android Version"

So I select Android 4.4 (Kit Kat) and build the project.

I get the following error message

Error: No resource found that matches the given name: attr 'android:elevation'

This is good, elevation was introduced in Android 5 so I need to rebuild using Xamarin forms for 4.4 (I think)

and this is where I get stuck, how do I tell Visual Studio I want to create a project for 4.4 not 8.0 ?

1

1 Answers

2
votes

Xamarin.Forms supports API 15+, I think you are confusing the compile Xamarin.Android Framework version, the Android Framework version and min. version

Additionally, the target/compile version for Android projects must be set to Use latest installed platform. However the minimum version can be set to API 15 so you can continue to support devices that use Android 4.0.3 and newer. These values are set in the Project Options

Re: Xamarin.Forms Getting Started

Re: Understanding Android API Levels