Mac OS El Capitan Unable to determine Android SDK directory error



I bought new mac book pro,it has El Capitan OS. I install nodejs,npm,cordova,ionic, java jdk and android sdk 24.

Outputs of commands :

java -version
java version "1.8.0_102"
Java™ SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot™ 64-Bit Server VM (build 25.102-b14, mixed mode)

cordova -version

ionic -version

echo $PATH



So when I run cordova build android on my project root directory I am getting this error

  • What went wrong:
    Execution failed for task ‘:processDebugResources’. org.gradle.process.internal.ExecException: Process ‘command ‘/Users/fatihayyildiz/Library/Android/sdk/build-tools/24.0.1/aapt’’ finished with non-zero exit value 1

When I am going to /platforms/android and run sudo ./gradlew assembleDebug --info I am getting this error

  • What went wrong:
    A problem occurred evaluating root project ‘android’.

Unable to determine Android SDK directory.

But when I run “android” command in terminal ,its open Android SDK Manager and SDK’s are already installed.

This screenshot from Android Studio SDK Tools

So anybody get this issue before ?


Me now? How did you fix that?


First step:
Run ionic cordova requirements.
(And post you ionic info output)