4

when i try to install "App center push" nuget package, this require Xamarin.firebase.messaging and when i try to install Xamarin.firebase.messaging , show me this error

For resolution, i try to change target framework of android , but not working.

Can you help me? this is the error:

The package Xamarin.Firebase.Messaging 71.1740.0 is not compatible with
monoandroid81 (MonoAndroid,Version=v8.1). The package Xamarin.Firebase.Messaging 71.1740.0 support: 
monoandroid90 (MonoAndroid,Version=v9.0)
  • Did you change the Android API level settings or the Xamarin.Android version? : https://stackoverflow.com/questions/49246580/xamarin-how-to-update-mono-android-version-to-resolve-dependencies/49248192#49248192 – SushiHangover Nov 05 '19 at 15:51
  • @SushiHangover yes , i have change to android pie (9.0) level api 28 , but not working – Ciro Ferraro Nov 05 '19 at 16:03
  • But which one are you changing, the `Target Android Version` which is the Android API **runtime** level (not the one that causes your error), but the Xamarin.Android **compile** `Target Framework` which is causing your error. – SushiHangover Nov 05 '19 at 16:20

1 Answers1

2

I can reproduce your issue when my Target Framework version is Android 8.1.

I then double-click Android Properties, choose Application tab, and set Compile using Android version: (Target Framework) as Android 9.0.

Then you go to Android Manifest tab, will find the Target Android Version (in Android Manifest) also become Android 9.0, now you can install Xamarin.firebase.messaging for Android project, it works fine.

enter image description here

Update

If the Target Android version is not Android 9.0 when you have change Compile using Android Version: (Target Framework), you can change this as Android 9.0, then see if still having same issue.

enter image description here

halfer
  • 19,824
  • 17
  • 99
  • 186
Cherry Bu - MSFT
  • 10,160
  • 1
  • 10
  • 16
  • After i compile with target framework as android 9.0 , i don't find target android version in android manifest ! – Ciro Ferraro Nov 07 '19 at 10:03
  • @Ciro,After you select **Compile using Android version:(Target Framework)** as Android 9.0, you can select Android Manifest tab, sliding down, you will see it. Please take a look my update. – Cherry Bu - MSFT Nov 08 '19 at 01:13