Android: Fix Missing Gradle 2.2.0 Dependencies

Over the weekend, Google removed version 2.2.0 of their gradle build tools from the standard repositories. However, 2.2.0 is the version of gradle GameMaker Studio uses to build your Android apps. Accordingly, you builds will now fail with the following error:

* Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Assuming Google does not simply put the files back in the near-future, a coming runtime update to GameMaker Studio 2 will resolve this issue by doing the steps we're about to cover in this FAQ, but while we wait for confirmation from Google you can fix things to get your apps building again just now by doing the following:

Open your GMS2 runtime cache directory. On Windows, the default location for this is "%ProgramData%\GameMakerStudio2\Cache\runtimes" and on macOS this is "/Users/Shared/GameMakerStudio2/Cache/runtimes".

Open the directory of your current runtime (e.g., 2.2.1287), and go to the "android\runner\RootFiles" subfolder.

Open the build.gradle file inside this folder. It should look like this:

Relaunch GameMaker Studio, clean the compiler cache (use the "broom" button at the top of the IDE) and then re-build your project. You should find gradle is able to find its files again and so your build succeeds again.