"Flutter run" 个问题 - 失败:构建失败并出现异常
"Flutter run" issues - FAILURE: Build failed with an exception
当我 运行 'flutter run' 我收到此错误消息。
我是 flutter、dart 和 android 工作室的新手。我真的不知道如何解决这个问题
$ flutter run
Using hardware rendering with device sdk gphone x86. If you notice graphics artifacts,
consider enabling software rendering with "--enable-software-rendering".
Launching lib\main.dart on sdk gphone x86 in debug mode...
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
> Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.3.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.6.3/kotlin-gradle-plugin-1.6.3.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.6.3/kotlin-gradle-plugin-1.6.3.pom
Required by:
project :
* Try:
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 13s
Running Gradle task 'assembleDebug'...
148.9s
Exception: Gradle task assembleDebug failed with exit code 1 ```
我的 android 模拟器和我尝试使用手机 phone 时都会发生这种情况
你觉得问题是什么?
此处的版本问题您可以通过更改您的模拟器 SDK 版本或 运行 在真实设备中(更改 SDK 版本后)来解决,您还可以更改您的最低和目标 SDK 版本。
当我 运行 'flutter run' 我收到此错误消息。 我是 flutter、dart 和 android 工作室的新手。我真的不知道如何解决这个问题
$ flutter run
Using hardware rendering with device sdk gphone x86. If you notice graphics artifacts,
consider enabling software rendering with "--enable-software-rendering".
Launching lib\main.dart on sdk gphone x86 in debug mode...
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
> Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.3.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.6.3/kotlin-gradle-plugin-1.6.3.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.6.3/kotlin-gradle-plugin-1.6.3.pom
Required by:
project :
* Try:
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 13s
Running Gradle task 'assembleDebug'...
148.9s
Exception: Gradle task assembleDebug failed with exit code 1 ```
我的 android 模拟器和我尝试使用手机 phone 时都会发生这种情况 你觉得问题是什么?
此处的版本问题您可以通过更改您的模拟器 SDK 版本或 运行 在真实设备中(更改 SDK 版本后)来解决,您还可以更改您的最低和目标 SDK 版本。