Reputation: 35873
Context
I am using VS 2017 and Xamarin to develop Android App. The specification requires the app should be run on Android 5 (Lollipop) and above. So I set the VS Project Properties/Android Manifest/Minimum Android version to Android 5.0 (API Level 21 - Lollipop). I also set Target Android Version to the same. Now I am getting the
The $(TargetFrameworkVersion) for FormsViewGroup.dll (v7.0) is greater than the $(TargetFrameworkVersion) for your project (v5.0). You need to increase the $(TargetFrameworkVersion) for your project.
Although I understand the problem, I do not want to set 'Target Android Version' to 7.0.
Question
Maybe the problem I do not understand the difference between the Minimal and Target framework setting.
Bottom line: I would build an app what capable to run on devices 5.0 Lollipop and above, what should I do? I this FormsViewGroup.dll (v7.0) is suitable for that build or must I downgrade that reference (along with some others which have the same issue?)
Upvotes: 0
Views: 670
Reputation: 3251
If you want to run on a minimum of 5.0 you can set your minimum to API 21, which is essentially the oldest API your app will support. Target API is the specific Android framework version that your app is compiled for at build time.
The general rule Xamarin says to follow is Minimum Android Version < Target Android Version < Target Framework
meaning that the target Android version should be bounded by the minimum Android and the target framework.
For more information they have a great overview explaining it all in detail.
Upvotes: 1