Android build returns "SDK location not found"


#1

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 local.properties 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 https://help.gradle.org

BUILD FAILED in 17s
Exited with code 1
I’ve tried to take configuration file from here: https://circleci.com/docs/2.0/language-android/

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

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

Can anybody help?


#2

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.


#3

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