+7 votes

Hello, recently i updated godot to version 3.3, and i am having a problem when i try to export to android.
the following message appears:

'apksigner' returned with error # 1

This problem did not happen in previous versions, can someone help me please?

Godot version 3.3
in Engine by (25 points)
retagged by

I have the same problem. Apparently in v3.3 the apksigner switched from JRE 8 to JRE 9. However, simply installing JRE 9 seems to break other things in the export process.
I ended up reverting to v3.2.3 for Android export, until an updated export guide is published - hopefully soon.

same problem, Ive already ask it on github: https://github.com/godotengine/godot/issues/48220

I am also getting a problem : apksigner returned with error #126
Please help I don't know what I am doing wrong
Android SDK path and debug keystore path is configured correctly.

5 Answers

+2 votes

i having the same problom

by (24 points)
+1 vote

I finally solved the problem.

Just put your keystore path, username and password correctly in the export preset.

by (25 points)

i just did, still not working, does it worked with ojdk 9 ? i am using 8

Try to make other keystore, maybe it can help.

i don´t know what i did but today the problem is not happening, i don´t move a thing btw, thanks anyway

EDIT: I believe I was having this error because I had provided a Debug Keystore path in the Export Options, but not the Debug Username and Debug Password. You either need to provide all 3 in the Export Options, or none (and then exporting will fallback to the Editor Settings).

EDIT: Open enhancement issue to have placeholders for the export presets: https://github.com/godotengine/godot/issues/48787

EDIT: Issue resolved with https://github.com/godotengine/godot/pull/48963!

How to add debug keystore Username and Password. And how to set username and password. Please tell

+1 vote

I've solved this by adding JAVA_HOME system variable on my windows setup. Here's the link with guide on how to do this: https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html

by (16 points)
+1 vote

In my case, as it turned out, in Android Studio it was crucial to delete all versions other than those listet in the docs:
https://docs.godotengine.org/en/stable/getting_started/workflow/export/exporting_for_android.html#download-the-android-sdk
Having some installed in parallel caused the troubles.

by (381 points)

Thanks a lot - that fixed it for me!

I had versions 24, 25, 28 and 29 in folders under 'build_tools', as well as version 31. I moved the older folders somewhere else for safe-keeping (in case I ever need to use them again) and now Godot is using the current version and all is well.

+1 vote

I solved this problem by uninstalling some build-tools versions:
I had the following versions installed:
27.0.3
28.0.3
29.0.2
30.0.3
31.0.0-rc

I uninstalled the versions:
27.0.3
28.0.3
And then it was solved.
I did it by following this report:
https://github.com/godotengine/godot-docs/issues/4796

For this, go to the folder where you have the android SDK.
Look there for "sdkmanager.bat" and go to its folder.
Run cmd from that folder to locate the cmd console in that same folder where the "sdkmanager.bat" file is located.
From the console install or uninstall by following the link I left before.
Notice the commands he uses to install and uninstall build-tools versions but do it with his own versions (no need to put ".bat" if you have the cmd console located in the same folder as the "sdkmanager.bat" file)::
sdkmanager --uninstall "build-tools; 30.0.1"
sdkmanager --install "build-tools; 29.0.3"

To find out the versions of build-tools you have installed, go to the folder where you have the android SDK and then to "build-tools".

by (16 points)
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 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 webmaster@godotengine.org with your username.