• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android Android export module building error with gradle

Ham

Member
I just recently bought the GMS2 mobile export module on Steam. After following the official guide and installing and setting everything properly, I keep getting build errors.

Please bear with me, I'm very new to this sort of stuff and have so far just been stumbling around.

This is the output I'm getting:
GML:
FAILURE: Build failed with an exception.

* Where:
Build file 'W:\com.company.game\build.gradle' line: 1

* What went wrong:
A problem occurred evaluating project ':com.company.game'.
> Failed to apply plugin [class 'org.gradle.api.plugins.BasePlugin']
   > Could not create service of type OutputFilesRepository using ExecutionGradleServices.createOutputFilesRepository().

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

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
I went through the website the output gave, but I had close to no idea what it was saying. I did notice that I couldn't use Gradle commands in cmd prompt though, and went through the entire installation process. It hasn't helped with the problem. Any ideas on what I'm to do or how to fix this? Help is much appreciated!
 

rIKmAN

Member
Did you make sure you used the correct versions of Android Studio, SDK, NDK etc from the Required SDKs article?
Same with the versions you choose in the Android Build Settings inside GMS2.

I setup Android on a new PC from scratch a couple of months ago, following the guide worked fine.
All the versions/settings I used can be found in this post.
 

Ham

Member
Did you make sure you used the correct versions of Android Studio, SDK, NDK etc from the Required SDKs article?
Same with the versions you choose in the Android Build Settings inside GMS2.

I setup Android on a new PC from scratch a couple of months ago, following the guide worked fine.
All the versions/settings I used can be found in this post.
Thanks for responding! Yeah, I followed all the steps and installed all of the latest versions of the SDKs and NDKs. After looking at the error code, I decided to mess about with gradle and after entering a few commands I didn't understand I gave up. Woke up the next day to find out it suddenly works, thanks alot for trying!
 

FrostyCat

Redemption Seeker
Take another look at what your error is about:
Code:
  > Could not create service of type OutputFilesRepository using ExecutionGradleServices.createOutputFilesRepository().
These kinds of errors related to inability to access files/directories are best resolved with restarts, as restarting will likely take out the processes hogging access to them. Typical suspects are virus scanners, automatic backup/sync agents (another reason NOT to use them on working copies), or other dangling instances of the compiler.
 
Top