Xamarin FireBase Analytics monoandroid 12

SSB 86 Reputation points
2023-01-19T20:25:44.46+00:00

Hi I am trying to add Xamarin.Firebase.Analytics to my Xamarin Forms app. getting the error below.

My Xamarin.Android AndroidManifest.Xaml is already set to android:targetSdkVersion="33". What else needs to be corrected for this to work?

Package Xamarin.Firebase.Analytics.Impl 116.3.0.7 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package Xamarin.Firebase.Analytics.Impl 116.3.0.7 supports:
  - monoandroid12.0 (MonoAndroid,Version=v12.0)
  - net6.0-android31.0 (.NETCoreApp,Version=v6.0)
Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,291 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 68,016 Reputation points Microsoft Vendor
    2023-01-20T01:37:52.31+00:00

    Hello,

    Firstly, please make sure your Xamarin.Forms version greater than 5.0.0.2478

    Then, Xamarin.Firebase.Analytics.Impl is Xamarin.Android Bindings for Google Play Services, do not install it in the Shared application folder or all application folders. Please just install it in the YourProject.Android folder. You can right-click your yourProject.Android folder, choose Manage nugget package selection, search Xamarin.Firebase.Analytics.Impl install it.

    Best Regards,

    Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. SSB 86 Reputation points
    2023-01-23T22:43:41.9933333+00:00

    Figured it out... Need to edit the Android.csproj file directly and replace

       <TargetFrameworkVersion>v11.0</TargetFrameworkVersion>
    

    with

       <TargetFrameworkVersion>v12.0</TargetFrameworkVersion>
    
    0 comments No comments