OFFICIAL Android: Fix Missing Gradle Dependencies

Discussion in 'Announcements' started by rmanthorp, Dec 10, 2018.

  1. rmanthorp

    rmanthorp YoYo Games Staff Admin YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    297
    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: Dec 10, 2018
    Overloaded, JeffJ, Pano and 1 other person like this.
  2. Tigas

    Tigas Member

    Joined:
    Jun 22, 2016
    Posts:
    21
    Solution for GMS 1.4.9999

    C:\Users\yourPC\AppData\Roaming\GameMaker-Studio\Android\runner\RootFiles
     
    Last edited: Dec 11, 2018
  3. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    4,538
    The same fix works on 1.4.9999, except the build.gradle file is in %appdata%\GameMaker-Studio\Android\runner\RootFiles.
     
  4. Bacon&Onions

    Bacon&Onions Member

    Joined:
    Aug 2, 2017
    Posts:
    43
    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
     
  5. Genetix

    Genetix Member

    Joined:
    Jun 22, 2016
    Posts:
    611
    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?
     
  6. Smiechu

    Smiechu Member

    Joined:
    Jul 14, 2017
    Posts:
    626
    Have you started GM with administrator privileges?
     
  7. Genetix

    Genetix Member

    Joined:
    Jun 22, 2016
    Posts:
    611
    Have not, I'll give that a try and see if it works. Thanks for the advice
     
  8. xSamx

    xSamx Member

    Joined:
    Dec 11, 2018
    Posts:
    1
    How to fix this?, i just found video, its not that hard :)
     
  9. Bacon&Onions

    Bacon&Onions Member

    Joined:
    Aug 2, 2017
    Posts:
    43
    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
     
  10. Amon

    Amon Member

    Joined:
    Sep 13, 2016
    Posts:
    272
    The fix does not work. It's not like it's rocket science to follow. It just doesn't work. I really need this working. What are my options?
     
    CleanWater and Bacon&Onions like this.
  11. Aaron Tytgat

    Aaron Tytgat Member

    Joined:
    Dec 7, 2018
    Posts:
    5
    Fix won't work here.
    Even with an emty Project. :(
     
  12. Bacon&Onions

    Bacon&Onions Member

    Joined:
    Aug 2, 2017
    Posts:
    43
    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
     
  13. Bacon&Onions

    Bacon&Onions Member

    Joined:
    Aug 2, 2017
    Posts:
    43
    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!
     
  14. Tigas

    Tigas Member

    Joined:
    Jun 22, 2016
    Posts:
    21
    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.
     
    CleanWater likes this.
  15. Jack S

    Jack S Member

    Joined:
    Jul 21, 2016
    Posts:
    63
    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.
     
  16. Mert

    Mert Member

    Joined:
    Jul 20, 2016
    Posts:
    382
    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: Jul 29, 2019
  17. Dan

    Dan YoYo Games Staff YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    339
    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.
     
    Pfap and Mert like this.
  18. CleanWater

    CleanWater Member

    Joined:
    May 29, 2018
    Posts:
    52
    I'm still having problems trying to generate .apk files in 1.4.9999. I followed this guide, but to no avail. =(
     
  19. kroart

    kroart Member

    Joined:
    Jun 16, 2018
    Posts:
    13
    +1
    Also need these features. I already send feature request about these some time ago.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice