Saturday 1 July 2017

Troubleshoot "failed to find target android-xx" When Including Android Studio Project

It's very common that the example project was built under other Android SDK. I got:

    failed to find target android-23

But I have android-25 installed.

(1) Go to the path where the Android SDK installed, we can see:
/SDK/sources/android-25
/SDK/build-tools/25.0.3

(2) Open build.gradle(Module:app)
We can see:
android {
    compileSdkVersion 23    buildToolsVersion "23.0.3"

Change it to:
android {
    compileSdkVersion 25    buildToolsVersion "25.0.3"

(3) Now press "Try Again"