While installing Plugin.FirebasePushNotification getting error-
Could not install package 'Xamarin.Firebase.Messaging 60.1142.0'.
You are trying to install this package into a project that targets 'MonoAndroid,Version=v7.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.
after updating Android API 7.0 this installation works well(when create a new project)
BUT i already have a project with compile version Android 6.0.
While installing this plugin on this project then it shows same error.
So how to solve this installation issue on my previous project?
You need to set your <TargetFrameworkVersion> to Android 8.0 or greater.
https://developer.xamarin.com/guides/android/application_fundamentals/understanding_android_api_levels/#framework
https://www.nuget.org/packages/Xamarin.Firebase.Messaging/ version 60.1142.0 only includes a MonoAndroid80 folder which means it requires APIs from Xamarin.Android 8.0 at a minimum to compile against.
If you want to figure this out yourself, do the following:
Download https://github.com/NuGetPackageExplorer/NuGetPackageExplorer
Download the NuGet via Manual Download
Open the .nupkg
Expand the lib folder to see the respective target frameworks
Related
I'm trying to include the Xamarin.Google.MLKit.BarcodeScanning in my Xamarin android project. The Xamarin.Google.Android.ODML.Image is one of the dependencies which is a pre-release version. When I install it, it also installs the Xamarin.Build.Download (version=0.11.3).
When I try to build the project afterwards, it give this error => Invalid item ID image-1.0.0-beta1
Does anyone know how to make this work?
I have created a new project to add the Xamarin.Google.Android.ODML.Image nuget package lastest versoin 1.0.0.2-beta1. And it also installed the Xamarin.Build.Download (version=0.11.3).
When I build the project, there was no error. So you can also try to download the lastest version instead of the 1.0.0-beta1.
In addition, you can create a new project to test or clean and rebuild your project. I used visual studio 2022 17.4 preview 2.1. The TargetSdk is Android api 33.
I have used visual studio 2019, I have added some NuGet packages but it's show error like..
Error Could not install package 'Microsoft.Build.Framework 14.3.0'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v9.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.
Note: My Xamarin Binding library(Android) solution target version9.0.
please help me to resolve this issue.
Try by updating your Microsoft.Build.Framework package to the latest version (at the moment it is 16.0.461).
You can check it also here: https://www.nuget.org/packages/Microsoft.Build.Framework/
Once I copied the build task property section from my iOS csproj to my Android csproj.. I got a slightly different message. It asked me to add Microsoft.Build.Utilities.Core.
I then had to add the Microsoft.Win32.Registry 5 nuget then as it tried to install 4.3.0 which my Android project didn't like.
An error occurred trying to install required android components on
Project 'PushNotificationEx.Android'. Project
'PushNotificationEx.Android' requires the following components
installed on your machine: Xamarin.GooglePlayServices.Base
JavaLibraryReference:
https://dl-ssl.google.com/android/repository/google_m2repository_r22.zip-m2repository/com/google/android/gms/play-services-base/8.1.0/play-services-base-8.1.0.aar-8.1.0
AndroidResources:
https://dl-ssl.google.com/android/repository/google_m2repository_r22.zip-m2repository/com/google/android/gms/play-services-base/8.1.0/play-services-base-8.1.0.aar-8.1.0
Xamarin.GooglePlayServices.Basement JavaLibraryReference:
https://dl-ssl.google.com/android/repository/google_m2repository_r22.zip-m2repository/com/google/android/gms/play-services-basement/8.1.0/play-services-basement-8.1.0.aar-8.1.0
AndroidResources:
https://dl-ssl.google.com/android/repository/google_m2repository_r22.zip-m2repository/com/google/android/gms/play-services-basement/8.1.0/play-services-basement-8.1.0.aar-8.1.0
Xamarin.GooglePlayServices.Gcm JavaLibraryReference:
https://dl-ssl.google.com/android/repository/google_m2repository_r22.zip-m2repository/com/google/android/gms/play-services-gcm/8.1.0/play-services-gcm-8.1.0.aar-8.1.0
AndroidResources:
https://dl-ssl.google.com/android/repository/google_m2repository_r22.zip-m2repository/com/google/android/gms/play-services-gcm/8.1.0/play-services-gcm-8.1.0.aar-8.1.0
Please double-click here to install it.
Intallation Errors: XA5207 Please install package: 'GPS Base'
available in SDK installer. Java library file
'C:\Users\user\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Base\8.1.0\embedded\classes.jar'
doesn't exist. XA5207 Please install package: 'GPS Basement' available
in SDK installer. Java library file 'C:\Program
Files\Android\android-sdk\extras\google\classes.jar' doesn't exist.
XA5207 Please install package: 'GPS GCM' available in SDK installer.
Java library file 'C:\Program
Files\Android\android-sdk\extras\google\classes.jar' doesn't exist.
I want to do push notification through onesignal . I'm getting this error after installing 'Com.OneSignal' package in my project. double clicking also not working..Please help..
This issue has nothing to do with OneSignal. You are most likely using an outdated Xamarin Forms project with a new version of Visual Studio 2017. Just to test this, I created a brand new Xamarin Forms project in VS 2017 and added OneSignal and it built just fine.
This problem stems from the lack of support for Xamarin Components in the most recent versions of VS 2017. To fix this problem, either follow this guide on Microsoft's website or start over with new Xamarin Forms project.
Hi I'm trying to install via nuget Xamarin.Support.V7.RecyclerView however I'm getting the following error :
"Could not install package 'Xamarin.Android.Support.v7.RecyclerView
25.1.1'. 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. "
i think this it will help you.
try to update or download new version xamarin visual studio it will give you monoandroid v7 to be worked and set your Droid TargetFrameworkVersion to Android 7.0 or bigger.
Xamarin new version go www.https://www.xamarin.com/ -> login -> Profile -> Dashboard -> Download
try to update android sdk Android 7.1.1(API 25)
After all done install again Xamarin.Support.V7.RecyclerView, it will work
I am currently working on a cross-platform app with Xamarin and I am trying to use the NuGet package Parse 1.7.0, but when I try to install the package via NuGet on Visual Studio 2015, I get this error :
Could not install package 'Parse 1.7.0'. 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.
Is it to understand the Parse official package is not compatible with Xamarin ? If so, is there a way to make it compatible ?
Thanks in advance !
If you look inside the nupkg of this package:
https://www.nuget.org/packages/parse
You will find a lib folder with the following targets available. Thus you are trying to target Profile259, but there is no definition in the Parse NuGet package for this. That is why it fails. You must install against one of these targets instead.
Thus if you installed this individually into MonoAndroid or Xamarin.iOS10, it work install just fine (Xamarin.Android and Xamarin.iOS projects respectfully).
Had the same, just remove the Silverlight platform from your targets and it should work