Android error messages can often be confusing, so here we will list some common errors GameMaker users have seen when building and so sent us a ticket about them. More importantly, we will also tell you how to fix them.
> com.android.ide.common.signing.KeytoolException: Failed to read key ... from store "...": Get Key failed: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
The Cause: You did not fill in the two password fields correctly when generating your keystore in Preferences.
The Fix: Open Preferences > Platform Settings > Android. Check both Password fields in the keystore section and ensure they match, only use standard alphanumeric characters, and are of a suitable length. Check all the other fields are what you wanted also. Then click the Generate button again to make yourself a fixed keystore file. Clean your project cache and try building again.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction
> Java heap space
(Or any other errors referring to Java heap space.)
The Cause: Gradle is running out of memory when compiling your project - either because of the size of the game itself or (often more likely) the size/requirements of an extension in your project.
The Fix: Open Preferences > Platform Settings > Android. Increase the size allowed by the Java heap size setting at the top of this dialog (it defaults to 2, so try 4 or even 8 if you have plenty of RAM in your PC/Mac). Okay the change in Preferences. Clean your project cache and try building again.
> java.lang.StackOverflowError (no error message)
Probably the same Java heap space error which is documented immediately above on this page. Try the same fix.