WARNING:R8: An API level of 34 is not supported by this compiler. Please use an API level of 33 or earlier (App must target Android 14 (API level 34) or higher)

Hey there,

Google: App must target Android 14 (API level 34) or higher

Unreal: WARNING:R8: An API level of 34 is not supported by this compiler. Please use an API level of 33 or earlier

I’m not entirely sure where to go from here, is there a way to update the compiler?

edit:
For reference Project settings
Mini sdk version 34 (To hit the target)
target sdk is 35

2 Likes

Just got hit with this too

Welcome back after 10 years :), I’ve been trying to figure this out for nearly 15 days, and I’m totally lost. The warning says we’ve got 45 days left, or something. So something needs an update lol.

1 Like

same issue, app just crashes in android 14 and all my native sharing code is broke
and not able to access files now

Dam that’s rough.

Assumably unreal know about this? What happens when the timer runs out, do we just get kicked off google? Do apps get taken down? Itd of though this would be getting a lot more focus, it seems pretty major.

Does anyone know a place to report stuff like this? It seems quite breaking.

no idea, tried with blank project too, just for confirmation,
Crashes in blanck project too

Same problem :frowning:

I’ve got a post up on Reddit too, but It all seems to be going to nowt. Unfortunately, at the moment, I’m nowhere near skilled enough to work this out.

I guess I’ll just bump this occasionally. I can’t really think what else to do.

OK so After continually diving through.

I’ve since updated to 5.4.3, I didn’t get prompted for it. I had to actually go to library and click run and it updated. The shortcut didn’t cut it.

Second, I decided to go through and uninstall anything I wasn’t directly using in android studio.

Weirdly, after booting unreal it asks to install an sdk.

Fair enough. But the allowed sdk versions are r25b through r26c
It installed r25b automatically and reinstalled the sdk: android 13 (tiramisu) which is api 33, equally it installed ndk 25.

So it’s ignoring my sdk 34/35 that are installed, and it’s ignoring ndk 27

That’s where I’m at now. I’m going to try and get it to install r26c instead.~

Update:

Also interestingly In the build folder- project.properties the project target is android-19

update 2:

Visual studio 2019 had some pretty major updates. Not sure if its related. but updating that too.

Right so progress has been made.

I noticed above it said AutoSdk: which assumably means I can manually designate too.

I went into system/advanaced and then enviromental and changed my ndk root from 25 to 27.

I went into unreal and designated the location of the folder from blank, directly to 27.

My sdk version now says r27 instead of r25b.

Which I think is a win…Maybe.

It failed with this error
Platform Android is not a valid platform to build. Check that the SDK is installed properly and that you have the necessary platorm support files.

When I click update it says successful but doesn’t fix it.

ndroid: (Status=Invalid, MinAllowed_Sdk=r25b, MaxAllowed_Sdk=r26c, Current_Sdk=r27, Allowed_AutoSdk=r25b, Current_AutoSdk=, Flags=“InstalledSdk_InvalidVersionExists, Platform_ValidHostPrerequisites, Support_FullSdk”)
UATHelper: Packaging (Android (ASTC)): Will install ‘Android SDK r25b’
UATHelper: Packaging (Android (ASTC)): ----------------------------------------------
UATHelper: Packaging (Android (ASTC)): Running ‘D:\Epic\UE_5.4\Engine/Extras/Android/SetupAndroid.bat android-33 33.0.1 3.22.1 25.1.8937393 -noninteractive’

Throws this error which is interesting, The max allowed is r26c so understandable.
Its still trying to force an old api.

The plan now:

Im kind of starting from the beginning.
Im installing the visual studio 22 and uninstalling 2019.

Following this guide

Then Im going to go through android studio and java to make sure everything is as updated as it can be.

Alrightttt.

So after

-updating to visual 2022 and uninstalling 2019. Making sure to include the extras in the guide.
-updating to 5.4.3 using launch instead of shortcut.
-using the max allowed ndk for 5.4.3 which is currently 26.2.11394342 (r26c) in android studio.
-I also set my root ndk in enviromental to the same ndk as above.
-Manually directing the location to said ndk.

I end up with this error :laughing:

WARNING:R8: An API level of 34 is not supported by this compiler. Please use an API level of 33 or earlier

sigh…

But I also got a new error wooo hooo :rofl:

WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 34
This Android Gradle plugin (7.4.2) was tested up to compileSdk = 33
This warning can be suppressed by adding
android.suppressUnsupportedCompileSdk=34
to this project’s gradle.properties
The build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdk = 34

Ok now Im getting somewhere…now how do you upgrade an android gradle plugin lol.

and boom there we have it. Thats assumably why.

Flamingo only goes to 33. I need to update to hedgehog as a minimum, but Im going to go for koala just because. (Android studio version).

Banging the same drum… did you get it to compile?
I have just started with android dev… threw together a game got google stuff all setup… upload a package to begin their month long testing process… and got informed Ill have to get it done and pushed in 30 days… ughh

Five years… five years and I decided to put the large projects on hold long enough to build a few free android games to get some revenue streams built to fund my other projects… it just never ends, why is it so hard to make a f $1…

No I got some help, but it pointed towards this link which is equally outdated using flamingo…
link to ue5 doc

Yeah Its pretty tiresome. I always wondered why everyone doesnt just make an app and release it to make some squids. I guess this is why, you need a phd just to upgrade API.

On the documentation page it stats this
“Different stores have their own target SDK minimum requirements, which may differ from that mentioned above.”
Which is a super fun way to say, hey google doesn’t want this, so figure it out.

Ok Ive just Reuploaded a production version that seems to hit 34+
Heres how I did it. (It still gets the warnings. Like…a lot of them, as posted above.)

I updated my Visual Studio following this guide. Link

  • Unreal was updated using its library launch instead of shortcut to update to 5.4.3.

  • Android studio was updated to the latest version of koala.
    Using the max allowed NDK for 5.4.3 which is currently 26.2.11394342 (r26c) in android studio NDK section.

  • I also set my root NDK in environmental to the same NDK as above.

  • I went into build.gradle and wrapper found here
    (Your drive)\UE_5.4\Engine\Build\Android\Java\gradle
    In build.gradle to 8.5.1
    and
    (Your drive)\UE_5.4\Engine\Build\Android\Java\gradle\gradle\wrapper
    In gradle-wrapper changing for 8.7

  • Inside unreal, I set Both SDK and NDK to latest
    Directed only the NDK to the location above.

  • And then mini and target sdk is both 34

It does say 34+ instead of 33+ In google console…But I guess we gotta wait to see after its published.

Update:
A big sigh… and a long lean back in the chair required.

Update 2: It has been accepted and this is finally solved.

1 Like

Ha ha glad you got it setup… cross fingers everything works… I bought plugins (as they provide LTS for updates to any future library changes) but there was actually a store bug that prevented me from installing to 5.4, while waiting for a reply on their discord i did a 5.5 source build *thought i was doing a 5.4, good news is they are aware of the issues and have implemented the necessary updates, turnkey now goes to r27, I was actually able to do a shipping build after a while trying different sdk/ndk/jdk targets but when uploading to the store it seemed the key didn’t get compiled (it was still using gradle 7.5, may be the issue) idk… but now the store bug is fixed so im back in the editor 5.4 version btw (it was using jdk20/ndk 27/android 35

With those settings you are able to support <34? I used 34 sdk and couldn’t run it on my 33 so i reverted to the 25.1.xxx ndk

compatible devices list 970ish? , means no support for sub 34 devices

Yeah, these settings got me to 34+ according to google console. But It still throws yellow errors in the log when it compiles saying that it only goes to 33 and update the compiler etc. (The exact errors are above.

I couldn’t exactly tell you why these settings work, as I have very minimal understanding of gradle things itself, Lol it’s been quite the learning curve to even find the file itself.

And yeah, about 970 devices sounds about right. I don’t exactly understand how they work this stuff out or what it bans. But It basically said I couldn’t do any further updates unless I updated it.
Assumably it means it wouldn’t work on anything less than 34.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.