Android build returns "SDK location not found"


Options mentioned in similar questions didn’t help for me. That’s why I’m creating question.

When trying to build project on CircleCi I get the following error:

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ‘:app’.

SDK location not found. Define location with sdk.dir in the file or with an ANDROID_HOME environment variable.

  • 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

Exited with code 1
I’ve tried to take configuration file from here:

I’ve also tried to use default configuration file, when building a project.

I’ve set ANDROID Home variable, I’ve checked file. Everything is correct.

Can anybody help?


To what value?

What base image are you using?

You could try a run step of ls $ANDROID_HOME (before the failure point, obviously) to see whether the SDK is in the location you think it is.


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.