OFFICIAL Android: Fix Missing Gradle Dependencies

rmanthorp

YoYo Games Staff
Admin
YYG Staff
Google has removed one of the build tools that GameMaker Studio uses to build your Android apps, and as such, builds may no longer function, giving an error something like:

Code:
> Could not resolve all dependencies for configuration ':classpath'.
> Could not find any version that matches com.android.tools.build:gradle:2.2.0+.
Versions that do not match:
2.3.0
2.1.3
2.1.2
2.1.0
2.0.0
+ 71 more
An upcoming update to GameMaker Studio 2 will resolve this issue, but until then you can fix things to get your apps building again by doing the following:

https://help.yoyogames.com/hc/en-us/articles/360020501832
 
Last edited by a moderator:
T

Tigas

Guest
Solution for GMS 1.4.9999

C:\Users\yourPC\AppData\Roaming\GameMaker-Studio\Android\runner\RootFiles
 
Last edited by a moderator:
Tried this fix, and still am getting this error-

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':com.company.game:mergeDebugResources'.
> Error: java.lang.RuntimeException: Crunching Cruncher icon.png failed, see logs

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

BUILD FAILED
 

Genetix

Member
After performing the troubleshooting steps, GMS2 tells me that the cache can't be cleared as it may be locked. I have made sure that the rootfiles folder and files are not open and have rebooted my computer (windows 10), but still seems to think these files are being edited. Anyone have any ideas to fix that?
 

Smiechu

Member
After performing the troubleshooting steps, GMS2 tells me that the cache can't be cleared as it may be locked. I have made sure that the rootfiles folder and files are not open and have rebooted my computer (windows 10), but still seems to think these files are being edited. Anyone have any ideas to fix that?
Have you started GM with administrator privileges?
 
I tried reverting back the build.gradle file and now I get a different error message:
Execution failed for task ':com.company.game:mergeDebugResources'.
> Error: java.lang.RuntimeException: Some file crunching failed, see logs for details
 
Yesterday was a new runtime was released, I just tested it out and-
I still can't compile to android.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':com.company.game:mergeDebugResources'.
> Error: java.lang.RuntimeException: Some file crunching failed, see logs for details

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

BUILD FAILED

Total time: 21.05 secs
AAPT err(Facade for 1208901598): libpng error: Not a PNG file
 
Update- I got it working!
First off I updated android studio and my build settings.
I don't think that fixed my problems, but updating from 23 to 28 did significantly increase the speed of building apks.
Then I re-generated the images in Options>Android>adaptive icons and that fixed it!
 
T

Tigas

Guest
I can compile for android but I can not display any type of ADS, admob, adbuddiz .. nothing works ...
GMS 1.4.9999
somebody help me.
 

Jack S

Member
To revive a zombie ... y'all are still on gradle from the dark ages... can you please upgrade to at least 4.10 if not 5.x which is current.
 

Mert

Member
To revive a zombie ... y'all are still on gradle from the dark ages... can you please upgrade to at least 4.10 if not 5.x which is current.
Very important issue! Check the roadmap here. Planned features here.

According to the RoadMap, they're working on an Android update right now. I have no idea what it includes.

What I *want and this is really an easy one, @rmanthorp : Please consider adding "extra Inject boxes to Extensions" which can inject code into ProjectFiles/build.gradle & RootFiles/build.gradle. (Just like injecting to AndroidManifest.xml). Plus, we should be able to add files directly to ProjectFiles folder via Game Maker Studio 2 UI.
 
Last edited:

Dan

YoYo Games Staff
YYG Staff
Yes, as mentioned above, this is being addressed for 2.2.4, along with adding API 29 support and bundle support for Google Play submissions.

@Mert We have already added another place to inject into for 2.2.4, but apparently it's not that one you want and so yours would be yet another to add. So can you send us a "feature request" ticket with an example use-case of an extension which requires that injection method and why you can't do this currently, and we will then review this.
 

CleanWater

Member
I'm still having problems trying to generate .apk files in 1.4.9999. I followed this guide, but to no avail. =(
 

kroart

Member
What I *want and this is really an easy one, @rmanthorp : Please consider adding "extra Inject boxes to Extensions" which can inject code into ProjectFiles/build.gradle & RootFiles/build.gradle. (Just like injecting to AndroidManifest.xml). Plus, we should be able to add files directly to ProjectFiles folder via Game Maker Studio 2 UI.
+1
Also need these features. I already send feature request about these some time ago.
 
Top