Reputation: 33
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
Upvotes: 0
Views: 173
Reputation: 716
Please try the following steps:
flutter clean
commentflutter create .
commentflutter pub get
commentUpvotes: 0