'Android Studio - I imported a file from GitHub but when I run it it gives an error
Solution 1:[1]
Just create a new flutter project in studio and then replace your lib folder and dependencies in pubspec.yaml if there are some. This could defend you from unexpected errors while working with old projects.
Solution 2:[2]
Open your Project's android folder in Android Studio and from Menu go to Android Studio > Preferences > Build,Execution,Deployment > Build Tools > Gradle. Now here change Gradle JDK version from 1.8 to 11 (given in dropdown).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | rozerro |
| Solution 2 |



