Android App Build Failed with Different Gradle Version

Hey There

I have a slight problem with integrating Circle CI with my Android Application.
I believe that my gradle version is 2.14.1 but Circle’s gradle version is 1.1.0 which causes the exception to be thrown.

Is there a way for me to manually update the gradle file verison on the CI server??

Thank you, will be waiting for you guy’s responses :slight_smile:

StackTrace!!!

> Configuring > 0/2 projects > root project > Compiling script into cache1/2 projects > :app > Compiling script into cache > Resolving dependencies ':app:classpath' > Compiling script into cache2/2 projects
> Configuring > 2/2 projectsFAILURE: 
> Configuring > 2/2 projectsBuild failed with an exception.
> Configuring > 2/2 projects
> Configuring > 2/2 projects
> Configuring > 2/2 projects* Where:
> Configuring > 2/2 projectsBuild file '/home/ubuntu/CaptivaDemoApp/app/build.gradle' line: 1
> Configuring > 2/2 projects
> Configuring > 2/2 projects* What went wrong:
> Configuring > 2/2 projectsA problem occurred evaluating project ':app'.
> Configuring > 2/2 projects> 
> Configuring > 2/2 projectsMinimum supported Gradle version is 2.14.1. Current version is 1.10. If using the gradle wrapper, try editing the distributionUrl in /home/ubuntu/CaptivaDemoApp/gradle/wrapper/gradle-wrapper.properties to gradle-2.14.1-all.zip
> Configuring > 2/2 projects
> Configuring > 2/2 projects* Try:
> Configuring > 2/2 projectsRun with 
> Configuring > 2/2 projects--stacktrace
> Configuring > 2/2 projects option to get the stack trace. Run with 
> Configuring > 2/2 projects--info
> Configuring > 2/2 projects or 
> Configuring > 2/2 projects--debug
> Configuring > 2/2 projects option to get more log output.
> Configuring > 2/2 projects
> Configuring > 2/2 projectsBUILD FAILED
> Configuring > 2/2 projects
> Configuring > 2/2 projects
> Configuring > 2/2 projectsTotal time: 29.7 secs
> Configuring > 2/2 projects
(gradle test) returned exit code 1

Fixed the issue by checking in my gradlew file and running ./gradlew instead of plan old gradle, everything worked :slight_smile:

1 Like

Thank @noobiehacker
I fixed same issue by change “- gradle test” to “- ./gradlew test”