I'm trying to run this sample project using GraphQL with the Apollo Android client: https://github.com/apollographql/apollo-android/tree/master/apollo-sample
I'm new to Android studio, here's what I did so far:
- Installed Android Studio on my machine (mac)
- Clone full Apollo Android repo
- Started Android studio and opened the
apollo-sample
directory from the cloned repo as an Android project
I am now getting this build error:
Error:SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
It's the same issue that's described in this SO question, however none of the solutions of the suggested answer worked for me:
I do have a local.properties
file in the root directory of the project that has the sdk.dir
set:
sdk.dir=/Users/nburk/Library/Android/sdk
I don't actually know where this entry is coming from, but it's definitely there. I'm assuming it points to the right location, the contents of that path are the following directories:
build-tools
emulator
extras
patcher
platform-tools
platforms
sources
tools
I also tried to set the ANDROID_HOME
env var as suggested in the accepted answer but this didn't work either: