+2 votes

Just yesterday I was exporting the game without any problems but when I tried to do it today I got the error mentioned in the title.

Editor settings and export settings are all set with correct paths and keystore user and keystore pass are also set correctly.

I've tried:

Installing build_tools 30.0.3 and uninstalling all other versions.

Installing everything else that is mentioned in the android export docs page with the correct version.

Installing OpenJDK 11 and Open JDK 17 and re-generating the debuy key for both versions.

Reinstalling android studio completely.

I also tried changing the jarsigner path in the editor settings to the apksigner.bat path since some people said that thats what you should do.

None of these worked and I got the same result everytime.

Godot version 3.4.1 stable
in Engine by (81 points)
edited by

1 Answer

+2 votes
Best answer

I encountered this problem today in Godot 3.4.2. Like you, I tried experimented with changing several paths, installing new versions of build_tools and upgrading my JDK. The following finally fixed my issue:

  • Uninstall OpenJDK 11 (and OpenJDK 8, if you have it)
  • Uninstall Android Studio
  • Delete all files from %USER_HOME%\appdata\Local\Android\Sdk
  • Reinstall OpenJDK 11
  • Install the Android SDK using the command line tools described in Godot's instructions: sdkmanager --sdk_root=<android_sdk_path> "platform-tools" "build-tools;30.0.3" "platforms;android-29" "cmdline-tools;latest" "cmake;3.10.2.4988404" "ndk;21.4.7075529"

I think the most crucial step is deleting the files from %USER_HOME%\appdata\Local\Android\Sdk. Other similar threads indicate that the apksigner fails if you have older build-tools versions installed.

by (144 points)
selected by

Thank You! Simply deleting the Sdk folder that you mentioned and reinstalling it fixed the issue for me!

Thank You! It helped me as well. I was about to give up. Now it finally works. :)

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.