Error when exporting to Android: All located 'apksigner' tools in C:/Users/user/AppData/Local/Android/Sdk/build-tools failed to execute

Godot Version

4.2.2

Question

`

When exporting the project to Godot 4.2.2 for Android, I encountered the error: [Code signing] All ‘apksigner’ tools located in the Android SDK ‘build-tools’ directory failed to execute. Please check that you have the correct version installed for your target SDK version. The resulting APK is unsigned. I tried to resolve this by reinstalling Android SDK and JDK but it didn’t help. I installed everything necessary for exporting and created a keystore. Please help me solve this problem! A list of everything I’ve installed to export to Android: Eclipse Adoptium jdk-17.0.16.8-hotspot, Android Platform 33, Build-Tools 33.0.2, NDK 23.2.8568313, Android SDK Command-line Tools (latest), CMake version 3.10.2.4988404, Android SDK Platform-Tools 36.0.0, Android Emulator 36.1.9

It tells you it couldn’t run apksigner. Run the apksigner yourself and see what the problem is. Maybe you just need to restart Godot or the system so the freshly installed pieces could be found; maybe it’s something else.

I run apksigner.bat, and it just closes with no error.