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.
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.
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
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
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
Thanks again to everyone who took the time to read and reply