Setting the Android API level

Don Glover 511 Reputation points
2020-11-22T12:26:53.407+00:00

I am trying to upload my app to Google Play for Release. I have built and signed my .apk. When I go to upload it I got the following error:

Your app currently targets API level 28 and must target at least API level 29 to ensure it is built on the latest APIs optimized for security and performance. Change your app's target API level to at least 29.

I have updated my TargetFrameWork
41649-target-frame-work.png

I have updated my AndroidManifest

<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="29" />

I have gone as far as to delete all release and debug build folders both in the shared project and the android project.

But, when I build the app and .apk and then try and upload it I still get the same error.

What am I missing?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,296 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Cheesebaron 1 Reputation point MVP
    2020-11-23T09:47:51.49+00:00

    In the Application tab in your screenshot. There you also need to change the TargetFramework to target Android 10.

    If you still are using packages.config instead of PackageReference to manage NuGet packages. You will need to remove the NuGet packages and add them again or manually update the entries in there to grab stuff for the correct target.

    So you need to update:

    • TargetFramework
    • AndroidManifest
    • If you are using PackageReference clean bin/obj
    • If you are using packages.config, remove all packages and add them back or manually update packages.config to point at correct TFM in nuget package

  2. Don Glover 511 Reputation points
    2020-11-25T19:16:41.693+00:00

    Ok, this turned out to be user (me) stupidity. I have resolved the issue.

    0 comments No comments