When I am trying to upgrade Xamarin.Forms NuGet package from 2.0-2.1 to 2.3.1.114 (latest stable at the moment) I get the following error (even with new blank projects) is there a way to fix it?
Severity Code Description Project File Line Suppression State
Error Could not install package 'Xamarin.Android.Support.v4 23.3.0'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v6.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
0
Try this option for your project:
This error is most probably because your xamarin forms version is not compatible with Xamarin.Android.Support.v4 23.3.0 available through NuGet. Check this thread on xamarin official forum. As per this thread, 23.3 is not supported by Xamarin forms. On more possible reason is that your xamarin form version is not compatible with the latest update. You can try updating forms to latest version. In case if that doesn't work, then probably you should continue with the version you already have.
Related
I updated Xamarin Forms to 3.4.0 on a Xamarin Forms Android project that was working fine. Now I am getting this error when attempting to build. The error is "invalid android support library configuration" and when I look at my Package Console I see this...
...saying that some of my Xamarin.Android.Support.xxx packages need a downgraded package for compatibility. Problems is, my project does not have any of this packages as you can see by my "Packages" folder here...
What am I missing or doing wrong?
This can happen if you update ALL of the nuget packages in a Xamarin.Forms Android project.
Xamarin.Forms has specific dependencies on specific versions of the Xamarin.Android.Support libraries, and if you update ALL of the nuget packages in the Android project, then the support libraries may update to versions later than the versions that the new Xamarin.Forms version supports.
At this point I would uninstall Xamarin.Forms package from the Android project and also uninstall all of the dependent support library packages, which are listed here under "Dependencies": https://www.nuget.org/packages/Xamarin.Forms/
So in the Android project, uninstall the following nugets:
Xamarin.Forms
Xamarin.Android.Support.Design
Xamarin.Android.Support.v4
Xamarin.Android.Support.v7.AppCompat
Xamarin.Android.Support.v7.CardView
Xamarin.Android.Support.v7.MediaRouter
Once uninstalled, just re-install Xamarin.Forms and the correct versions of the support packages should be re-installed.
In the future, just update the Xamarin.Forms packages and that will automatically update the support library packages if necessary, and will not update the support libraries if the newer support library versions are not supported by the updated Xamarin.Forms version.
Updating Xamarin.Forms and all *.Support.* libraries to the latest version worked for me.
You have a version compatibility problem, if you have updated some packages recently, you must go to the package manager "NuGet/Update" you will find all Xamarin packages need update.
I created a "Cross-Platform App (Xamarin.Forms)" app, and i immediately went and update the nuget packages (this is what i was told to do). Then i tried to built it, and not only I got several errors(see bellow) that were about the updated packages, I had code errors as well. I swear the God that i didn't touch the code of the project at all, and here is what I get:
I googled, but i couldn't find out a clean solution for this. I am just one step before quitting this (unprofessional) product, because i cannot run the ready template. Is there someone that can give me a piece of advice for these ridiculous errors ?
Could not install package 'Xamarin.XXXXXXX'. You are trying to install this package into a project that targets 'MonoAndroid,Version=vX.X'
You need to increase your "Compile Target Framework" to at least 7.0 as this error indicates.
You can review the dependancies of a package on the Nuget.org site by looking at the Dependencies section of a particular package:
https://www.nuget.org/packages/Xamarin.Android.Support.v7.AppCompat/
Another SO question/answer example that requires at least MonoDroid 8.0:
https://stackoverflow.com/a/49138485/4984832
Example:
Xamarin.Android.Support.v4 27.0.x.x requires at least MonoAndroid 8.1 to be set as the Compile Target Framework:
You have to use newer android SDK version. You can download the SDK from android SDK manager and then select it from project properties
I'm new to mobile development & Xamarin. I'm trying to install a 3rd party nuget package "BottomNavigationBar" to my portable project in Xamarin solution. But facing the below error while doing so.
Could not install package 'Xamarin.Android.Support.Compat 24.2.1'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile259', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
I'm having Xamarin.Forms version 2.3.4.247, with Android target framework "Android 7(Nougat)". And I have Android SDK installed with API 24.
Any help is appreciated.
As SushiHangover says this component targets Xamarin.Android only so it will be impossible to install in the PCL project.
You should use a similiar plugin that targets Xamarin.Form, this plugin is called: BottomNavigationBar.XF
You can see their source code here: https://github.com/thrive-now/BottomNavigationBarXF
I recently decided to update everything in my Xamarin workspace, including all NuGet packages, and Xamarin.Forms.
I first installed all the newest Xamarin.Android.Support packages, which clashed with the current version of Xamarin.Forms that I had, so I decided that I needed to update Xamarin.Forms anyway. I removed it and installed all the other packages (which worked lovely) and now I am trying to reinstall Xamarin.Forms again, but I am receiving:
Unable to resolve dependencies. 'Xamarin.Android.Support.Design 23.4.0.1' is not compatible with 'Xamarin.Forms 2.3.0.107 constraint: Xamarin.Android.Support.Design (= 23.3.0)'.
Any suggestions?
I'm quoting James Montemagno from the Xamarin Forums here.
Xamarin.Forms locks in a very specific version of the support
libraries and google play services. You can't update them because
Xamarin.Forms isn't compatible with them as it would need to be
re-compiled.
Xamarin.Android.Support.v4 (= 23.0.1.3) Xamarin.Android.Support.Design
(= 23.0.1.3) Xamarin.Android.Support.v7.AppCompat (= 23.0.1.3)
Xamarin.Android.Support.v7.CardView (= 23.0.1.3)
Xamarin.Android.Support.v7.MediaRouter (= 23.0.1.3)
See the = 23.0.1.3, which means it is only compatible with that
version number. This is just how NuGet works. When Xamarin.Forms
updates these packages will auto update.
Forms gets 'linked' to a specific version of the Android libraries so it can be guaranteed that it will work together as it should. At this point, Xamarin.Forms (stable) isn't updated yet to use the latest Android Support packages. So you probably want to go with a somewhat older version of Forms, or check if there is a Forms pre-release which already has a reference to the newer Android Support libraries.
Of course; using these is not recommended in a production environment.
They added it in the official FAQ
You can't update Xamarin.Forms and Xamarin.Android at the same time. As It has dependency issues with versions.
So first, Select only Xamarin.Forms 2.3.0.107 and update.
After that, Select rest of the Xamarin.Android.support lists and update.
I would extremelly recommend by 1 year of experience with Xamarin.Droid and Xamarin.iOS to only update Xamarin.Forms to latest version, and ignore Other Xam.Support Libraries unless is extremelly necessary to bug fix something that you need.
Reason #1: It is not fully tested by Microsoft.
Reason #2: You might need to spend hours configuring and fixing the references e version compatibility.
According to me own experience, I would recommend to:
If your project is very old, try to migrate the list of your packages from packages.config to the .CSPROJ. Unlike packages.config, PackageReference lists only those NuGet packages you directly installed in the project. As a result, the NuGet Package Manager UI and the project file aren't cluttered with down-level dependencies. More info here
Clean the Nuget packages cache(s) : Tools -> NuGet Package Manager -> Package Manager Settings -> Clear All NuGet Cache(s)
Use the NuGet Console to get more details about you errors. Open the console (Tools -> NuGet Package Manager -> Package Manager Console), then type Update-Package
Always Clean and Rebuild after updating your packages
For Resolution follow below steps
Close Visual Studio and Navigate following Folder
C:\Users\\AppData\Local\Xamarin
and Remove “ Zib “ Folder
(it will re-create automatically while build solution )
Right Click
on Your Solution /Project ➔ manage nuget Package➔ Click on Update
tab ➔ Update Xamarin Form
Restart Visual studio⇒Open project ==>
Clean Solution and build Add your Nuget package Now
Refered from : https://xamarininterviewquestion.blogspot.in/2016/12/upgrade-nuget-xamarinandroidsupportdesi.html
Starting with Xamarin.Forms 2.3.4 you can manually update all the Xamarin.Android.Support NuGet packages. The condition is that the Target Framework and the Target Android version options of your project (if you don't know what I'm talking about check out this page: Understanding Android API Levels) are set to at least Android 7.0, i.e API 24, or higher.
The official Xamarin documentation has also been updated: Xamarin Forms Troubleshooting
Following this tutorial I'm trying to install MvvmCross.HotTuna.MvvmCrossLibraries in Core project. The latest version of this library 'MvvmCross.HotTuna.MvvmCrossLibraries 4.0.0-beta3'.
After adding Nuget Package I have the following error:
Could not install package 'MvvmCross.HotTuna.MvvmCrossLibraries 4.0.0-beta3'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.0,Profile=Profile14', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
Does anyone know what the problem is?
Answer to original question:
MvvmCross is not available for ASP.NET. You need to use it in one of the compatible frameworks like UWP, Xamarin.Android, Xamarin.iOS or a PCL.
Updated Question:
MvvmCross uses at least .NET 4.5 with profile 259. Switch to those to be able to install the libraries.