编译报错:ERROR: Failed to find Platform SDK with path: platforms;android-Q

编译报错

ERROR: Failed to find Platform SDK with path: platforms;android-Q

搜索全部source code内容发现,build.gradle中内容如下

android {
    compileSdkVersion 'android-Q'

    defaultConfig {
        applicationId "com.google.android.gms.location.sample.locationupdatesforegroundservice"
        minSdkVersion 16
        targetSdkVersion 'Q'
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

可以看到

compileSdkVersion和targetSdkVersion均为Q

修改如下

android {
    compileSdkVersion 29

    defaultConfig {
        applicationId "com.google.android.gms.location.sample.locationupdatesforegroundservice"
        minSdkVersion 16
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

 

你可能感兴趣的:(编译报错:ERROR: Failed to find Platform SDK with path: platforms;android-Q)