When i create new flutter project and click run i have this problem
"Could not initialize class com.android.sdklib.repository.AndroidSdkHandler"
Flutter doctor enter image description here
CodePudding user response:
1-go to Android/build.gradle. 2-if jCenter() exist try this changes:
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jCenter() // change this to mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jCenter() // change this to mavenCentral()
}
}
CodePudding user response:
Trate de ejecutar en la consola: flutter clean