• 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 SOLVED Change the order of repositories in build.gradle? Build failure

Pushloop

Member
Hi,

Since yesterday I can't build for android anymore. I looked up the error below and found a solution on stackoverflow. It seems that the google() repository needs to be placed before the jcenter() in the build.gradle. I changed it in the runtime root folder and it worked.

Solution link on stackoverflow: https://stackoverflow.com/questions...ctnotfoundexception-could-not-find-play-servi

Error building for android:
Could not find play-services-basement.aar (com.google.android.gms.play-services-basement:15.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/goo...ment/15.0.1/play-services-basement-15.0.1.aar
 
Last edited:

Pushloop

Member
for me it's here : C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-2.2.0.261\android\runner\RootFiles
 

Andrey

Member
Hi,

Since yesterday I can't build for android anymore. I looked up the error below and found a solution on stackoverflow. It seems that the google() repository needs to be placed before the jcenter() in the build.gradle. I changed it in the runtime root folder and it worked.

Error building for android:
That's great information! Thank you!
I spent half a day figuring out the problem.

By the way here's a link to the explanation >>>
 
I

imineti

Guest
Hi,

Since yesterday I can't build for android anymore. I looked up the error below and found a solution on stackoverflow. It seems that the google() repository needs to be placed before the jcenter() in the build.gradle. I changed it in the runtime root folder and it worked.

Solution link on stackoverflow: https://stackoverflow.com/questions...ctnotfoundexception-could-not-find-play-servi

Error building for android:
I have found the build.gradle file, what program did you use to edit it?
 
C

Charzendat

Guest
Hi. So I am having this problem but that solution isn't working for me. When I open build.gradle I get this

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0+'
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}

So the google() isn't even there. I tried adding it in but that returns with a different error. Good someone please advise.
 
P

Pano

Guest
@Charzendat move maven before Jcenter:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0+'
}
}
allprojects {
repositories {
maven {
url "https://maven.google.com"
}
jcenter()
}
}
 
Top