8

I have been trying to update our Xamarin Native (Xamarin.Android) application's traget framework to Android 14.

Whereas, I have installed the SDK tools of API 34 and it is reflecting under Target Android version in Manifest. But cannot see Android 14 under Compiler Android version under Target Framework.

Compiler Android Version (Target Framework) : enter image description here

Target Android Version under Manifest:

enter image description here

I am aware that Xamarin has ended its support. But Android 14 is included under the Xamarin. Still, why am I not able to see Android 14?

Can someone please help with it?

Thanks in Advance!!

2
  • My guess this is because Xamarin has been replaced by MAUI, thus Xamarin may no longer receive updates because MS expects all developers to migrate to MAUI. Commented Jun 16, 2024 at 16:33
  • Yes, it doesn't receive updates but isn't it Android 14 the last supported version of Xamarin? Commented Jun 16, 2024 at 17:13

2 Answers 2

10

You won't see Android 14 under Compiler Android version (Target Framework)

All you need to do is include the following in your manifest

<uses-sdk android:minSdkVersion="25" android:targetSdkVersion="34" />

You will get the following warnings but you can safely ignore them.

Severity Code Description Project File Line Suppression State Warning XA1008: The TargetFrameworkVersion (Android API level 33) is lower than the targetSdkVersion (34). Please increase the $(TargetFrameworkVersion) or decrease the android:targetSdkVersion in the AndroidManifest.xml so that the API levels match.

The aab you produce will be accepted by Google Play.

The only thing you can't do is use any new Android 14 features such as credential manager etc.

You can only use the new features when you then convert your project to Net8

The comments above about Maui are totally irrelevant if your project is Xamarin.Android.

I originally converted my app to .Net8 when it was released, but the general performance was inferior to the Xamarin.Android version, so I stuck with the X.A version so I could release it. Hopefully, by now they have overcome the performance problems so I'll convert again, now that the beta of Android 15 is available.

Sign up to request clarification or add additional context in comments.

10 Comments

Thanks for your detailed explanation. I am not planning for any Android 14 features. I am just trying to update the version so that my existing app to work fine in Android 14 devices. "The only thing you can't do is use any new Android 14 features such as credential manager etc. " This means that app works fine on Android 14 devices but the android 14 features wont be supported on my app right?
This means that app works fine on Android 14 devices but the android 14 features wont be supported on my app right? Yes that is correct.
Setting the targetSdkVersion does not appear to be enough to satisfy Google, it still gives the policy warning
Could you please expand on what you mean by "policy warning"
When I follow the above instructions, it does not let me run the app, it still gives the target framework is less than... warning. It lets me archive it and submit to Google Play, but then gets rejected (and the uploaded aab is listed as SDK 34 at Google Play). I don't use any of the new features of Android 14. I did find it interesting that you mentioned the credentials manager, since Google Play claims I didn't provide them with credentials. I don't know where I could have accidentally tried to use the feature, but if that is the problem, maybe it will help me figure out what to look for.
|
-3

I just updated the target SDK to 34 and everything went fine when compiling and deploying to the play store but when a device tries to update/install the new version they get this error:enter image description here

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.