2

I am trying to run a flutter app on Android studio. It throws error

flutter Failed to find Platform SDK with path: platforms;android-R

My app build.gradle is

buildscript {
 ...


    lintOptions {
        disable 'InvalidPackage'
    }

    defaultConfig {
        applicationId "com.inspireui.fluxstore"
        minSdkVersion 23
        targetSdkVersion 30
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
        resConfigs "en"
    }


    afterEvaluate {project ->
        if (project.hasProperty("android") && project.property("android").compileSdkVersion.equals("android-R")) {
            android {
                compileSdkVersion 30
            }
        }
    }
}

Have tried below solution Failed to find Platform SDK with path: platforms;android-P

kevin shah
  • 21
  • 3

0 Answers0