Home > Blockchain >  Upgrading Android API Target level to 12 from 11 in Xamarin Forms
Upgrading Android API Target level to 12 from 11 in Xamarin Forms

Time:10-06

I'm using Xamarin Forms, and as per the Google Play store requirements(Nuget packages

Any suggestions on how to resolve this issue?

CodePudding user response:

Well the clear-cut reason this is not working for you is because of your Firebase libraries, They are literally ancient. I am surprised you still haven't faced any issues until Android 11.

The best way to fix this is to upgrade the following libraries to at least these versions:

Xamarin.Firebase.Analytics 120.0.1
Xamarin.Firebase.Analytics.Impl 116.3.0
Xamarin.Firebase.Messaging 123.0.3

Goodluck

Feel free to get back if you have queries

CodePudding user response:

You can solve the problem by following the steps below:

1.Set target SDK to 30 (to silence 31 errors).

2.Open application's manifest (AndroidManifest.xml) and click on "Merged Manifest" tab on bottom of your edit pane.

3.Go to the individual manifest file of all the libraries (You can skip this step if the merged manifest is created and you can just look into the merged manifest)

4.Search if there's any entry of type activity, service, receiver, or provider which does not have an exported attribute, and for each entry follow below "Fix found entries" section.

5.Set target SDK back to 31 (or whatever it was before changing to 30).

For how to repair known errors(both android: exported="..." and tools: node="merge" are necessary), please refer to the following:

<receiver
android:name=""
android:exported="false or true"
tools:node="merge" />

<Service
android:name=""
android:exported="false or true"
tools:node="merge" />
  • Related