Android Build Fail

Mehdi

Member
Hello
I am working on exporting for android since last week and GMS:2 seems not going to give me an apk!

I followed all the guidelines concerning Android Studio, ndk, sdk,jdk, build tools, min/target/compile sdk , ...

But it only shows me :

* What went wrong:
A problem occurred evaluating project ':com.mental.evil'.
> Could not find method implementation() for arguments [androidx.legacy:legacy-support-v4:1.0.0] on project ':com.mental.evil'.

does anyone know what is the problem? What can I do? Many many thank in advance:(
 
Last edited:

Mehdi

Member
Does anyone know which gradle version GMS2 currently supports? Previously version 2.0.0 was supported.
 

Mehdi

Member
Thanks friends. I changed the gradle version in build.gradle to 5.1.1. Now I have new errors:

* What went wrong:
A problem occurred configuring root project 'root'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:5.1.1.
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/gradle/5.1.1/gradle-5.1.1.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/5.1.1/gradle-5.1.1.jar
Required by:
:root:unspecified

By the way this is my gradle wrapper:

#Fri Sep 23 11:20:58 BST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

Could you please help me?
 

rIKmAN

Member
Thanks friends. I changed the gradle version in build.gradle to 5.1.1. Now I have new errors:

* What went wrong:
A problem occurred configuring root project 'root'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:5.1.1.
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/gradle/5.1.1/gradle-5.1.1.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/5.1.1/gradle-5.1.1.jar
Required by:
:root:unspecified

By the way this is my gradle wrapper:

#Fri Sep 23 11:20:58 BST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

Could you please help me?
Download the latest version of GMS2 and follow the Android Setup Guide from the start making sure you use the listed versions of each of the tools and SDKs from that guide and the Required SDKs article that chirpy posted above.

Once setup correctly, the first time you compile GMS2 will automatically download the required gradle files and other required build tools - this is mentioned at the end of the guide I linked above.
Note that the first time you try to test an Android game, Google's compile tools may need to connect to the internet to download additional files and tools, which in turn may prompt a firewall alert - if this happens you should allow the connection otherwise the build will fail. This is normal and should only happen the first time you build using those SDK values. Be aware that Gradle (the Google tool in question) will occasionally check for its own updates, though, if you are online at the time.
 

Mehdi

Member
SUCCESS!
Thank you. I searched all around web and nothing in GM forums helped me. Only Stack Overflow and I changed and tested many things. And finally without knowing what exactly happened, it worked and now i make successful builds for android. However as i said I didnt get what exacxtly was the problem because of the god-damned fragmented nature of android! o_O
I think Google must clean up the mess of so many thousands of libraries required for that. Just imagine the following mess: SDK, NDK,JDK, Gradle, Android Studio, Min sdk,Compile sdk, target SDk, AVD,Build tools :mad::mad::mad::mad: I think it shouldnt be required to set up such terrifying junks messed around everywhere to create an export.
 
Top