Publishing to Quest store via Oculus Platform Tool, invalid AndroidSDK target - 4.3 Dotnet

Godot Version

4.3

Question

I am trying to upload a Godot 4.3 Dotnet build to the Meta Quest dashboard via the Oculus Platform Tool at the CLI. It throws the error:

Android Target SDK version is 34, but should be 32 or lower (targetSdkVersion in AndroidManifest.xml).

When trying to update the AndroidManifest and config.gradle, godot complains that AndroidSDK 34 is the default for gradle plugin 8.2.0 and will be used. It also fails to build but that is not surprising since the config.gradle has these comments:
// Also update ‘platform/android/export/export_plugin.cpp#OPENGL_MIN_SDK_VERSION’
minSdk : 21,
// Also update ‘platform/android/export/export_plugin.cpp#DEFAULT_TARGET_SDK_VERSION’
targetSdk : 34,

I read this as meaning I need to clone the godot source, make the changes described in the comments above and create a custom build of the editor that targets AndroidSDK 32.

I am prepared to do it since there seems no other choice. I did try downgrading to godot 4.0 which apparently targets AndroidSDK 32 as default but that broke the project dependencies. I would love to hear if anyone has any experience with this. Is there another option I am overlooking? Is it even possible to do what I am trying? etc.

Any feedback would be greatly appreciated :slight_smile:

What happens if you just change those values and also get the v32 sdk?

Maybe you havent gotten that far?

You can try git checkout 4.0.1-stable -- platform/android to only checkout the sdk 32 version of the platform code keeping everything else in 4.3.

You may also need to download the export template as well.

Thanks for the quick reply. I cloned the source, created a branch and ran the command you suggested “git checkout 4.0.1-stable – platform/android”.

When trying to build it fails at a seemingly relevant spot:
platform/android/export/export_plugin.cpp:46:10: fatal error: editor/editor_scale.h: No such file or directory
46 | #include “editor/editor_scale.h”
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Is this what you mean by needing to download the export template? Sorry for all the confusion I am not very experienced with either git or building from source and really appreciate the help.

I just went in the export settings and set the 34 to 32 and exported it and ignored warnings and it all worked fine for me :man_shrugging:

Not exactly, but now that you mention it… maybe you dont need to build the engine maybe you just need to modify the export template. As mentioned by @trevorblythe82

Try adjusting the export settings too

Thank you @trevorblythe82, this is why I posted here, such a simple solution. I had come to the conclusion that the targets could not be changed in the export settings, I have no idea why, i did try to change it :confused:

The complete lack of information around this made me suspicious that I was indeed overlooking something simple.

Simply changing the targeted SDK did the trick :+1:

Thanks again to everyone who took the time to read and reply :slight_smile:

1 Like