Android/gradle build failure

Hey, I’m getting a build failure related to gradle. I’m sure for some reason an old version of gradle is trying to compile my project, but I’m not sure why because I have new versions specified in my files.

Here is the error.

FAILURE: Build failed with an exception.

* Where:
Build file '/home/ubuntu/Android/app/build.gradle' line: 16

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not create plugin of type 'AppPlugin'.

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


export TERM="dumb"
if [ -e ./gradlew ]; then ./gradlew dependencies;else gradle dependencies;fi
 returned exit code 1

Total time: 4.654 secs Action failed: gradle dependencies

It’s not liking this line, as Google has deprected the ‘android’ plugin name

apply plugin: ''

I have the following gradle dependency in my projects build.gradle

    classpath ''

I’m looking for other solutions, but is gradle baked into my container and needs to be upgraded or something else obvious?

1, I had circle.yml in the wrong spot. But i still get the same error. Looks like gradle 1.10 is installed. I need 2.4.

I fixed this with following in circle.yml :

- sudo add-apt-repository ppa:cwchien/gradle -y
- sudo apt-get update
- sudo apt-get install gradle-2.6

1 Like

Nice, do you know if I have to install gradle every time the test runs or how I can make it always use the specific gradle version without having to install it again?

I think you need to install every time. I switched from apt-get to simple wget, it’s faster


1 Like

Did that in pre, but the build is still trying to use gradle 2.4

Gradle version 2.10 is required. Current version is 2.4.

Very late reply, but to record it for others having the same problem later, in circle.yml set you path to point to the directory with your unzipped gradle binary :

      PATH: "~/$CIRCLE_PROJECT_REPONAME/gradle-2.14.1/bin:$PATH"