when I run 'flutter run' I get this error message. I am new to flutter, dart, and android studio. I don't really know how to solve this
$ 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 ```
It happens with my android emulator and also when I try using my mobile phone What do you think is the problem?
CodePudding user response:
version issue here you can solve by changing your emulator SDK version or run in a real device (after changing SDK version) and also you can change your minimum and target SDK version.