I am trying to run flutter project on my phone but I get this exception:
FAILURE: Build failed with an exception.
Could not resolve all artifacts for configuration ':classpath'. Could not find com.android.tools.build:gradle:4.1.3. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.3/gradle-4.1.3.pom - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.3/gradle-4.1.3.jar - https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.3/gradle-4.1.3.pom - https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.3/gradle-4.1.3.jar Required by: project:
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 2s Exception: Gradle task assembleDebug failed with exit code 1
Please try the following steps:
flutter clean
commentflutter create.
commentflutter pub get
comment
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.