I'm trying to open an Ionic2 Project in Android Studio, but it gives me the following error into the Event Log: "Gradle sync failed: No installed build tools found. Install the Android build tools version 19.1.0 or higher. Consult IDE log for more details (Help | Show Log)" SCREENSHOT
I have seen a similiar problem stated before (also maybe one of the latest release of Ionic2 or Cordova broke something -> https://github.com/driftyco/ionic/issues/10604).
Changing the version of "buildToolsVersion" or "compileSdkVersion" from gradle.build file or from Project Structure didn't help.
Under "C:\Users\Gaby\AppData\Local\Android\sdk\build-tools\24.0.3", I installed the 24.0.3 build tool version.
The path variable from environment variables indicates also the path correctly
At one moment, I had all build-tools installed with "android update sdk -u -a" but again, the same error occured.
Does anybody know a suitable workaround to this issuse ?
Many thanks
You need to write the correct "Environment Variables". See: https://developer.android.com/studio/command-line/variables
Windows:
setx ANDROID_SDK_ROOT "C:\android-sdk-windows"
setx PATH "%PATH%;%ANDROID_SDK_ROOT%\tools;%ANDROID_SDK_ROOT%\platform-tools"
Mac OS X
export ANDROID_SDK_ROOT=/<installation location>/android-sdk-macosx
export PATH=${PATH}:$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools
Linux
export ANDROID_SDK_ROOT=/<installation location>/android-sdk-linux
export PATH=${PATH}:$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools
Update: ANDROID_HOME is deprecated, ANDROID_SDK_ROOT is now the correct variable