Xamarin.Firebase.Database Compatibility Issue - firebase

I have created a Xamarin Andoid project (Not a Xamarin Forms project) using Visual Studio 2019 and it is working fine (No any code changes done). By default it has these Nuget packages installed:
I tried to install Xamarin.Firebase.Database latest version (71.1601.0) and got this error.
Then I tried to install the previous version (60.1142.1) and it got installed. But When I try to build the project I got this error.
I am unable to run the project so how can I resolve this issue?

If you just install the Xamarin.Android.Support.v4 28.0.0.3, you still cannot install Xamarin.Firebase.Database (71.1601.0), you should install following nuget packages.
Xamarin.Android.Support.Compat (>= 28.0.0.3)
Xamarin.Android.Support.Core.UI (= 28.0.0.3)
Xamarin.Android.Support.Fragment (= 28.0.0.3)
Xamarin.Android.Support.Annotations (= 28.0.0.3)
Xamarin.Android.Support.VersionedParcelable (= 28.0.0.3)
I installed Xamarin.Firebase.Database latest version (71.1601.0) successfully, Here is my screenshot.

i got same error a week ago. Remove adroid native nuget packages all from your adroid part. Then install your package. if you need, then install your android packages.
I had one packages installed named "android.support.*****". Searched but couldnt find solution easily. Compiler suggests that installing so many packages. I removed the one android package then i could installed the xamarin packages.

I had a similar error and solved it as follows. My error was an Xamarin.Firebase.Common (71.1610.0) installation error. Error disappeared after installing Xamarin.Android.Support.v4 "(28.0.0.3). Hope it helps

Xamarin.Essentials has a dependency on Xamarin.Android.Support.v4 28.0.0.3 while Xamarin.Firebase.Database has a dependency on Xamarin.Android.Support v4 28.0.0.1. The error message is telling you to directly add a reference to Xamarin.Android.Support.v4 28.0.0.3. That should fix the problem for you.

Related

Error found while developing games with react

I am getting the following error while duilding tic-tac-toe game with react.
"./src/index.css (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-3-1!./node_modules/postcss-loader/src??postcss!./src/index.css)
Error: Package exports for 'G:\Nodejs\projectReact\tic-tac-toe\node_modules\colorette' do not define a valid '.' target"
I faced a similar issue when I had the latest colorette version installed i.e. 1.2.1. As per my understanding, this version of colorette requires Node 14+ while I have Node 13.1. Therefore there are two options to resolve this, either upgrade Node to 14+ version of downgrade colorette to its previous version 1.2.0.
I have not tried upgrading Node as it will effect my other projects so I have just downgraded colorette to 1.2.0 and it works fine for my case by using following commands.
To uninstall colorette:
npm uninstall colorette
To install colorette version 1.2.0:
npm install colorette#1.2.0
Had the same problem when using node v 13.1.x upgrade it to 14.x helped so far using command :
sudo n latest

error NU1102: Unable to find package Microsoft.AspNetCore.Localization with version (>= 2.2.0)

In my build pipeline, I have a step as follows:
SDK version I'm using in global.json is 3.1.201". With this, when I try to create a build, I get the following error:
error NU1102: Unable to find package Microsoft.AspNetCore.Localization with version (>= 2.2.0)
error NU1102: - Found 9 version(s) in Microsoft Visual Studio Offline Packages [ Nearest version: 1.1.3 ]
I don't know if this is related sdk version. Can someone help with fixing this issue?
Adding this step and also adding the step NUGET Installer before and switching from visual_studio 2017 to windows 2019 as the build agent solved the problem for me.
Strangely when creating a new pipeline from template "Azure function" the Nuget Restore step is missing...
Can you add step to restore nuget packages. I don't see this one on attached screen.

Xamarin.Forms downgrade package issue

I'm using Xamarin.Forms. I updated all Xamarin.Android.Support package in my VS project. So when I realize updating Xamarin.Android.Support package in Xamarin.Forms is a mistake, I remove all package and install Xamarin.Forms last version and let it to install the dependencies in other word downgrade the dependencies to 23.3.0 version. So now, when I clean and rebuild my solution I get this error.
This project references NuGet package(s) that are missing on this
computer. Use NuGet Package Restore to download them. For more
information, see http://go.microsoft.com/fwlink/?LinkID=322105. The
missing file is
....\packages\Xamarin.Android.Support.Compat.25.4.0.2\build\MonoAndroid70\Xamarin.Android.Support.Compat.targets.
I think we should not install this package manually. Xamarin.Forms should take care of the dependencies. All dependencies is in 23.3.0 version and it is clear that no need to install Xamarin.Android.Support.Compat.25.4.0.2 manually.
So what should I do to solve this issue?
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.
When you want to update Xamarin.Forms ONLY update Xamarin.Forms, don't update all of the packages. When you update just Xamarin.Forms it will update it's dependencies to the correct version number needed.
If you already update the other nugets that aren't letting you update, you could simply uninstall your packages and re-install just Xamarin.Forms.
Here is a video: http://screencast.com/t/U5FBj6KlH
The issue was solved. The package CarouselView.FormsPlugin new version (4.4.3) has dependency to Xamarin.Android.Support.v4 version 24.2.1 (Android 7).
Downgrade to version 4.4.2 fixed the issue.

NuGet Packages Version conflics

I'm coming to ask a question, maybe stupid, but I can't find a good explanation about it..
For this example, I'll take for example a Xamarin Forms - Portable Project and look at the Project.Droid part. Also, I'm gonna take the following packages:
Xamarin.Forms.Map 2.3.1.114
and
Xamarin.Android.Support.Vector.Drawable 23.3.0
Xamarin.Android.Support.v7.RecyclerView 23.3.0
Xamarin.Android.Support.v7.MediaRouter 23.3.0
Xamarin.Android.Support.v7.CardView 23.3.0
Xamarin.Android.Support.v7.AppCompat 23.3.0
Xamarin.Android.Support.v4 23.3.0
Xamarin.Android.Support.Design 23.3.0
Xamarin.Android.Support.Animated.Vector.Drawable 23.3.0
As you can see, the Xamarin.Forms.Map package is version 2.3.1.114 and the others, 23.3.0. However, an update is available, but when I make it, the package of 23.3.0 version update to 23.4.0.1 while Xamarin.Forms.Map is downgrading to 1.5.1.6471 ...
Why does it work like it? why everything doesn't up to the last update? What are the differents effects of this update/downgrade? Also, what's the best choice? Does it's better to update the Xamarin.Android.Support.xxx packages and downgrade the Xamarin.Forms.Map one or do the reverse?
Thank in advance for your answer/explanation :)
Some package are update and not compatible with the last version of Xamarin.form, because the updates are not at the same frequency the principal reason, are all the new versions of Xamarin.form need to be probe, and be stable and may be exist a delay between one and other.
for Example if you try to install Xamarin.Android.Support.Design
Attempting to resolve dependencies for package 'Xamarin.Android.Support.Design.23.4.0.1' with DependencyBehavior 'Lowest'
One or more unresolved package dependency constraints detected in the existing packages.config file. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'Xamarin.Android.Support.Design 23.3.0'
Unable to resolve dependencies. 'Xamarin.Android.Support.Design 23.4.0.1' is not compatible with 'Xamarin.Forms 2.3.1.114 constraint: Xamarin.Android.Support.Design (= 23.3.0)'.
'Xamarin.Android.Support.Design 23.4.0.1' is not compatible with 'Xamarin.Forms 2.3.1.114 constraint: Xamarin.Android.Support.Design (= 23.3.0)'.
Xamarin Form 2.3.1.114 say I'm compatible with the version = 23.3.0
Regards.
The nuget manager allowing you to update packages to the version compatible with target SDK version selected in the project properties. If you need to upgrade to the newer version you have to install newer version of android SDK and update it in project properties to be able to upgrade nuget packages.

NuGet: 'X' already has a dependency defined for 'Y'

I'm getting the following error in NuGet while trying to install package Microsoft.AspNet.Server.IIS
Attempting to resolve dependency 'Microsoft.AspNet.Loader.IIS.Interop (≥ 1.0.0-alpha4-10330)'.
Attempting to resolve dependency 'Microsoft.AspNet.Loader.IIS (≥ 1.0.0-alpha4-10330)'.
'Microsoft.AspNet.Loader.IIS' already has a dependency defined for 'Microsoft.AspNet.FeatureModel'.
How to resolve it?
UPDATE:
Also, I'm getting the following:
Attempting to resolve dependency 'Microsoft.Framework.DependencyInjection (≥ 1.0.0-alpha4-10326)'.
'Microsoft.Framework.DependencyInjection' already has a dependency defined for 'Microsoft.Framework.ConfigurationModel'.
This was resolved by installing the latest NuGet Package Manager:
https://visualstudiogallery.msdn.microsoft.com/4ec1526c-4a8c-4a84-b702-b21a8f5293ca
Don't forget to restart Visual Studio.
I fixed a similar issue in my solution by:
Opening up a command prompt
Navigating to the .nuget folder in my solution
Running nuget update -self
This upgraded the copy of NuGet.exe that was in my solution from 2.8.0 to 3.4.4, which fixed the 'X' already has a dependency defined for 'Y' error that was stopping it from downloading SSH.NET automatically before building.
(If your solution doesn't have a copy of NuGet.exe in it - and it might not - then you should try the solution in TN's answer instead)
I tried the update, but it did not work for me. Helped:
Uninstall NuGet => Tools => Extensions and update => Installed
Install NuGet
Reload Visual Studio
I faced this error on outdated version of Visual Studio 2010. Due to project configuration I was not able to update this version to newer. Therefore, update of NuGet advised above did not fix things for me.
Root reason for the error in this and similar situations is in dependencies of the package you try to install, which are not compatible with .NET version available in your project.
Universal solution is not obligatory update of Visual Studio or .NET but in installation of older NuGet versions of the same package compatible with your system.
It is not possible to tell for sure, which of earlier versions will work. In my case, this command installed the package without any NuGet updates.
Install-Package X -Version [compatible version number]
I was getting this issue on our TeamCity build server. I tried updating NuGet on the build server (via TC) but that didn't work. I finally resolved the problem by changing the "Update Mode" of the Nuget Installer build step from solution file to packages.config.
I was getting the issue 'Newtonsoft.Json' already has a dependency defined for 'Microsoft.CSharp' on the TeamCity build server.
I changed the "Update Mode" of the Nuget Installer build step from solution file to packages.config and NuGet.exe to the latest version (I had 3.5.0) and it worked !!
Go to the link https://www.nuget.org/packages/ClosedXML/0.64.0
Search your NuGet packages
See the all version of related packages
Install the lower version of packages
In my case I had to delete the file NuGet.exe in the Project folder/.nuget and rebuild the project.
I also have in NuGet.targets the DownloadNuGetExe marked as true:
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">true</DownloadNuGetExe>
Hope it's helps.
The only solution that worked for me was to uninstall nuget completely from Visual Studio 2013 and then install it again with the obligatory restart of VS in between.
Go to Tools.
Extensions and Updates.
Update Nuget and any other important feature.
Restart.
Done.
In a project using vs 2010, I was only able to solve the problem by installing an older version of the package that I needed via Package Manager Console.
This command worked:
PM> Install-Package EPPlus -Version 4.5.3.1
This command did not work:
PM> Install-Package EPPlus -Version 4.5.3.2

Resources