Я пытаюсь установить последнюю версию Xamarin.Firebase.Messaging (на сегодняшний день: 60.1142.1) в проекте Xamarin.Android моего решения Xamarin.Forms.
Я получаю такую ошибку:
Attempting to gather dependency information for package 'Xamarin.Firebase.Messaging.60.1142.1' with respect to project 'prova.Droid', targeting 'MonoAndroid,Version=v7.1'
GET https://api.nuget.org/v3/registration3-gz-semver2/xamarin.firebase.messaging/index.json
OK https://api.nuget.org/v3/registration3-gz-semver2/xamarin.firebase.messaging/index.json 137ms
Total number of results gathered : 20
Gathering dependency information took 157,61 ms
Summary of time taken to gather dependencies per source :
https://api.nuget.org/v3/index.json - 156,72 ms
Attempting to resolve dependencies for package 'Xamarin.Firebase.Messaging.60.1142.1' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Xamarin.Firebase.Messaging.60.1142.1'
Resolved actions to install package 'Xamarin.Firebase.Messaging.60.1142.1'
Retrieving package 'Xamarin.Firebase.Messaging 60.1142.1' from 'nuget.org'.
GET https://api.nuget.org/v3-flatcontainer/xamarin.firebase.messaging/60.1142.1/xamarin.firebase.messaging.60.1142.1.nupkg
OK https://api.nuget.org/v3-flatcontainer/xamarin.firebase.messaging/60.1142.1/xamarin.firebase.messaging.60.1142.1.nupkg 540ms
Acquiring lock for the installation of Xamarin.Firebase.Messaging 60.1142.1
Acquired lock for the installation of Xamarin.Firebase.Messaging 60.1142.1
Installing Xamarin.Firebase.Messaging 60.1142.1.
Completed installation of Xamarin.Firebase.Messaging 60.1142.1
For adding package 'Xamarin.Firebase.Messaging.60.1142.1' to project 'prova.Droid' that targets 'monoandroid71'.
Install failed. Rolling back...
Package 'Xamarin.Firebase.Messaging.60.1142.1' does not exist in project 'prova.Droid'
Package 'Xamarin.Firebase.Messaging.60.1142.1' does not exist in folder '/Users/g.paradiso/Projects/prova/packages'
Executing nuget actions took 592,47 ms
Could not install package 'Xamarin.Firebase.Messaging 60.1142.1'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v7.1', 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.
Я следую руководству это, и в нем говорится, что вам нужно использовать версию 57.1104.0-beta1, и она работает, но почему я не могу использовать последнюю версию?
Could not install package 'Xamarin.Firebase.Messaging 60.1142.1'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v7.1', but the package does not contain any assembly references or content files that are compatible with that framework.
Короче говоря, это означает проблему совместимости, при необходимости прочтите ее несколько раз, пока не получите ее.
Чтобы решить эту проблему, проверьте зависимости пакета NuGet здесь «Xamarin.Firebase.Messaging 60.1142.1». Если у вас есть MonoAndroid 8.0
, там четко указано MonoAndroid 7.1
.
Таким образом, вы можете использовать более старую версию Xamarin.Firebase.Messaging
(не рекомендуется) или обновить целевую платформу в проекте Android до версии 8.0.