34.0 is not a valid TargetPlatformVersion for Android. Valid versions include: 35.0

Kim Strasser 1,076 Reputation points
2024-11-19T09:41:03.52+00:00

I changed the Target framework in my Android project properties from .NET 8.0 to .NET 9.0.

But then I get this error:

34.0 is not a valid TargetPlatformVersion for Android. Valid versions include: 35.0

Screenshot 2024-11-19 102241

Is it necessary to change the Target OS version to 35.0?

In addition, is it necessary to change the targetSdkVersion in AndroidManifest.xml to 35?

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.6" android:versionCode="26">
	<uses-sdk android:minSdkVersion="31" android:targetSdkVersion="34" />

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,650 questions
{count} votes

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 44,481 Reputation points Microsoft Vendor
    2024-11-21T02:36:33.8166667+00:00

    Hello,

    Thanks for your feedback.

    As the documentation mentions, there is no need to specify an additional Android SDK version number when upgrading to .NET 9.

    It works now. I get no more errors. But I still get many warnings. Is it necessary to change something or can I ignore the warnings?

    This is because these Nuget Packages have not yet completed the migration to .net 9.0. You can wait for them to officially support .net 9.0 and then update them to resolve these warnings.

    Best Regards,

    Alec Liu.


    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.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.