Unity 2020.3.48 incompatible with Target version API 34?

After installing the Target API 34 Unity is unable to build the project and gives errors -

After build message:
“A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade”

And in the console:

  1. Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
  2. Temp\gradleOut\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.
  3. Gradle build failed

Please help, I have 0 ideas what to do, I researched but could not find a solution.

I tried reinstalling editor and SDK NDK packages but still same.
I am thinking that maybe Unity Editor version is not compatible with the newest T API 34 ? If so should I upgrade to 2022.3 ?

Thank you for your time!

I’m not sure about the issue, but if you decide to upgrade, I think upgrading to 2021 is more prudent for now.

It seems target API 34 is still in dev, so I dont need it yet. And maybe thats why the errors ?

Upgraded to Unity 2021.3.30 LTS and still the build fails. Even though now I am targeting API 33 (not 34), which did work previously.

Same error again :
Temp\gradleOut\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.

Tried using SDK from a Unity 2022 LTS by setting path to an empty test projects SDK, but still the deprecated error.

*Resolving Android dependencies did succeed.

I am unable to publish a needed bug fix. Please help :frowning:

I reinstalled the editor, updated to newer version and still the gradle and SDK are messed up

Note: D:.…\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:launcher:checkReleaseDuplicateClasses’.

1 exception was raised by workers:
java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class com.ironsource.unity.androidbridge.AndroidBridge found in modules IronSource-bridge.jar (IronSource-bridge.jar) and android-bridge.jar (android-bridge.jar)

  • Tried deleting bee folder only
  • Then deleting the library - still same

Assembly ‘Assets/ExternalDependencyManager/Editor/1.2.175/Google.IOSResolver.dll’ will not be loaded due to errors:
Unable to resolve reference ‘UnityEditor.iOS.Extensions.Xcode’. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.

I have same problem. this appeared for no reason. I simply opened my project that worked perfectly yesterday, and today this error!

Ok, Solved. When i updated my Editor i miss to install IOS module. Add it at UnityHub Modules:

I had both modules, the problem was because I tried updating the target API for android. And gradle just broke down, I could not fix it and reversed back to 33 instead of 34

Could somebody tell me how long will be able to use Unity 3d 2020 version and to be able to update Android’s newest API Levels?
When shall I think about remaking my game on a newer version of Unity 3D, if I want to update versions of my game according to the newest API levels? Now I am with Unity 2020.3.48 - the latest version. What I read in Unity’s site is that there will be no next 2020.3 version. So, maybe next year it is possible to be not able to update my game to the newest API 35 level of Android?

I believe 2020.3 already not compatible with API 34.

Correct, 2020.3 is no longer supported.

That’s possible. And by then Unity 2021.3 will be out of support, so if you consider upgrading, 2022.3 is recommended.

I dont agree with this, I am with Unity 2020.3.48 and I successfully exported the project to API 34
I updated the Android SDK , can’t remember how, I think followed this video
:
https://www.youtube.com/watch?v=fP1moOOWhrY

We did fix some bugs recently specifically for API 34. 2020.3 does not have those fixes. Maybe your game doesn’t hit those places.

Hi,

In 2022.3.34

When selecting Target API, levels 34 and 35 still appear different in the dropdown menu, does it mean they are still unavailable ?

in Autumn 2023 the project was unusable after setting API 34. Is it fixed now ?
9912045--1432635--Unity_fF8CT4GJlC.png

Apparently they fixed some bugs at some point: Can't build for Android 34 - #14 by pixelsprite_unity

It probably works much better than before (since before it didn’t work AT ALL and Unity was silent on whether it was supposed to, for months), but since I’m pretty sure everyone sane is still publishing to the Android store with API level 33, I’m fairly sure it’s not very battle tested.

API 34 stable platform release October 2023.
(Its been 1 year and still Unity breaks the project when updating to 34)

API 34 Google Play deadline for an app to have such update - October 2025
(always 2 years since release)

Can anyone please confirm a successful update and publish with 34 ?

Just got new update from Google Play :

"
Update your target API level by August 31, 2024 to release updates to your app

Jul 4, 2024 14:53
We’ve detected that your app is targeting an old version of Android. To provide users with a safe and secure experience, Google Play requires all apps to meet target API level requirements.

From August 31, 2024, if your target API level is not within 1 year of the latest Android release, you won’t be able to update your app.

"

I have another Q - Editor 2022.3.37f let me change the API to 34 without asking to update ? does that mean I am set with the API 34?

Also from project preferences the path to SDK folder - platforms - shows API33 and API34 folders. each with sub folders

Yes, latest 2022.3 versions include API 33 and API 34 with default installation