Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 23510 [details]
Warnings from trying to use support libs from app targeting API level < 7.0
Hi, I'm looking to use the following libraries in my Android app:
This StackOverflow question https://stackoverflow.com/q/35023149/4077294 says that, from Java, RecyclerView and CardView are available since at least Lollipop. The answerers also say that the support libraries allow these controls to be used pre-KitKat. I was surprised when I found that right-clicking my app project in VS, going to Properties, and targeting the app to anything less than 'Android 7.0 (Nougat)' caused warnings. (see image 1)
When I tried to run my app despite the warnings, I got a Mono runtime error about a missing virtual method. See here: https://github.com/jamesqo/Repository/issues/69
Would it be possible to make the above libraries (and their dependencies, namely Xamarin.Android.Support.Core.UI, Xamarin.Android.Support.Compat, and Xamarin.Android.Support.Annotations) available on pre-KitKat devices?
Thank you for your time.
I believe this is a misunderstanding of how support libraries work mixed with a combination of the three SDK version values in Android.
These support libraries that are named "v7" means they support all the way back to API 7.
The problem you are running into is that the libraries you have installed REQUIRE a minimum of Android 7.0 (API 24). However your project has a compileSdkVersion of 6.0 which is not the minimum. Thus these methods that the support library depends on are not included when compiling your app and thus fail at runtime.
You can also see this noted as a dependency when you look at the nuget:
I would recommend reading up on these items here to understand fruther:
Thus I am marking this bug as RESOLVED ANSWERED
Thanks for your response. I now understand that by lowering the TargetFrameworkVersion in my app's .csproj to 6.0, I was lowering the compileSdkVersion instead of the minSdkVersion.
Just a question-- if TargetFrameworkVersion controls compileSdkVersion, how does one configure min/targetSdkVersion from a Xamarin.Android project?
(In reply to James Ko from comment #2)
> Jon Douglas,
> Thanks for your response. I now understand that by lowering the
> TargetFrameworkVersion in my app's .csproj to 6.0, I was lowering the
> compileSdkVersion instead of the minSdkVersion.
> Just a question-- if TargetFrameworkVersion controls compileSdkVersion, how
> does one configure min/targetSdkVersion from a Xamarin.Android project?
You can look through our documentation on this subject found here:
Note: Use the top right switcher to switch between VS and VS4Mac.
I looked through the instructions you linked to. I'm very confused because the docs show this image:
But I see this in VS2017 (the min/targetSdkVersion selections are missing):
Should I file a new bug with the people who work on the Xamarin extension for VS?
No bug is needed for this. In VS 2017 they were recently moved.
The other two items are under "Android Manifest".
OK, I see them now. Thanks for your patience :)