Closed OladotunO closed 6 years ago
The last update screw ups my project too, I need to install a package which has a dependency with Xamarin.Android.Support.v7.AppCompat and it's failing because of this:
Could not install package 'Xamarin.Android.Support.Design 27.0.2'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v8.0'
Same here
Package Xamarin.Android.Support.v7.AppCompat 27.0.2 is not compatible with monoandroid80 (MonoAndroid,Version=v8.0). Package Xamarin.Android.Support.v7.AppCompat 27.0.2 supports: monoandroid81 (MonoAndroid,Version=v8.1)
I manually ran Visual Studio Installer and there is an update. Perhaps that will fix this problem.
Yeah, you have to manually update VS and then change the Target Framework to Oreo 8.1. In my case set it to automatically the latest didn't work.
I just wasted a whole day trying to update Xamarin packages from v25 to v27.
I started with a well working project in VS 2017 v15.5.6. Trying to upgrade packages to v27 resulted in the above error message ("... is not compatible with monoandroid80") over upgrading VS to 15.6.1, which resulted in problems during app start (app appears and disappears without errors), "cannot connect to logcat" errors, killing and restarting the adb server, rebooting, installing/removing android SDKs, build tools, uninstalling the app from the phone and wtfever I cannot even remember all the things I tried today. The last thing I did before the app finally started again was disabling parallel builds!
At the end of that day I seem to be able to start the app again but I have no idea what I did wrong at the beginning, nor what I did to make it work again. Sorry for that lousy error report.
I have the same problem here.
Could not install package 'Xamarin.Android.Support.Animated.Vector.Drawable 27.0.2'. You are trying to install this package in a project that is intended for 'MonoAndroid, Version = v8.0', but the package does not contain any assembly or content reference that is compatible with this framework. For more information, please contact the package author.
Has anyone managed to solve the problem?
Having the same problem, cannot install and update half of packages that I needed.
Everyone has this problem, the author should fix this problem as soon as possible.
@NoleHealth and matmiranda. According to your error message you are trying to install support components with a higher version (api 27) then your targer framework (api 26). That is not possible. You first need to set your target framework to api 27 aka Android 8.1 Oreo before you can update the support components to api 27. See this channel 9 episode where its is explained in more detail: https://channel9.msdn.com/Shows/XamarinShow/Snack-Pack-14-Upgrading-Android-Support-Libraries Or did you do that? If you did and receive this error then it might be bug.
@michelmoorlag Huge confusion point cleared up. Thanks.
Good video. I'll try that with the next update. I think for me (being new to Xamarin) the error message was quite confusing:
"Package Xamarin.Android.Support.v7.AppCompat 27.0.2 is not compatible with monoandroid80"
I didn't see the link between "... isn't compatible with monoandroid80" and upgrading to API 27, so ended up upgrading VS and trying other stupid things. Maybe the error message could be improved...
I've got the same issue. I am using MonoAndroid v8.1 with target API 27. The reason is that linked dependencies are requiring MonoAndroid v8.0. The full chain of dependencies (with monoandroid version in brackets) Xamarin.Android.Support.v7.AppCompat 27.0.2 (monoandorid81)->Xamarin.Android.Support.Compat 27.0.2(monoandorid81)->Xamarin.Android.Arch.Lifecycle.Runtime 1.0.3(monoandroid80 - here starts failure)->Xamarin.Android.Arch.Lifecycle.Common 1.0.3(monoandroid80)
You'll need to have your project set to use <TargetFramework>MonoAndroid81</TargetFramework>
which means you'll need Xamarin 15.6 at least installed to use v27.x of android support libraries.
The linked dependencies requiring MonoAndroid 8.0 is something we'll be fixing in the 27.1.0 release, however this should not prevent you from installing this still, though if you're using
We're working on 27.1.0 release which will update the Arch dependencies to 1.1.1 as well, and those will target MonoAndroid81 which hopefully makes things work without being so explicit in your PackageReference listings.
Well its working now, what did was 1,Install Android sdk 27.xx and sdk P(Probably unnecessary) 2,Upgraded VS to 15.6.3 3, selected Android 8.1 in project properties for compile using(application tab) target android version(android manifest tab)
I had done the above before, but may have missed out step 3, not sure, but it failed then. Now it works.
Thanks all
This setting was missing for me in csproj:
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
adding it fixed it for me.
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
alone was not enough, NuGet still thought I use 'MonoAndroid,Version=v8.0'
@michelmoorlag thank you! the video helped me sort it out.
For me, it was because I couldn't install 8.1. Visual studio update was necessary. See this: https://blog.xamarin.com/xamarin-android-now-double-stuffed-with-oreo-8-1/
Even though I had set everything to 8.1, I had to go into the .csproj and update TargetFrameworkVersion to 8.1, it still said 8.0. Maybe there is another place I was supposed to set this but editing it manually allowed me to upgrade.
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
The old "You must explicitly select the Target framework" bug is back. You can change the value in the application settings by explicitly setting the value, rather than selecting "Use latest platform".
@lhughey that's the answer!
In my case. I have used a Nuget package Geolocator and which is not updated to the latest whereas Support Nuget is updated. So after updating the Geolocator nuget issue resolved
Just update the Targeted SDK to Android 9.0 (Pie), This worked for me
TargetFrameworkVersion
@MagicAndre1981 Which section do you put it?
@mMarcos208
in first PropertyGroup in Android csproj. I now target 9.0 (required for my used syncfusion controls and here the AndroidUseLatestPlatformSdk entry was removed by Visual Studio.
Hi Guys
I have been struggling to instal Xamarin.Android.Support.v7.AppCompat v27.xx on a blank android project in Visual studio 2017 via the nuget package installer. Afterall, I had done so only a few days ago and on many other projects.
So I gave up, and looked at the other projects, then tried to update them, and they fail to update. V26.1.0.1 installs and is the last working one for me.
Is this a bug or has something changed ?
Cheers