Reputation: 3232
Due to dominant use of older Android versions , we have decided to downgrade our application from using target framework API 23 (chosen by Xamarin by default) to API 16 (JellyBean). However, this change has broken our application, since we cannot even build it.
In the file 'values.xml', we get an error saying 'No resource found that matches the given name: attr 'android:elevation'.'. It seems, the application tries to use the material theme, which was not available in the older APIs. Since 'values.xml' is a generated file, I have no control over it (at least no direct control). I have tried deleting the bin and obj folder, cleaning and rebuilding the project, but nothing helped. Does anyone know how to solve the issue? The project is part of a Xamarin.Forms solution.
Upvotes: 0
Views: 535
Reputation: 2124
To use Xamarin.Forms you have to set the latest available Target Framework-Version
.
You are looking for the Minimum Android-Version
which will do the job for you.
The target/compile version for Android projects must be set to Use latest installed platform. The minimum can be set to API 15, which means you can continue to support devices that use Android 4.0.3 (and newer). These values are set in the Project Options.
See the Xamarin.Forms Getting Started Guide.
Upvotes: 2
Reputation: 2434
If what you want is to support also lower versions of Android, I would suggest you to set Minimum Android Version
rather than Target Android Version
. Check the screenshot from Xamarin Studio
below.
Upvotes: 1