Your project’s Gradle version is incompatible with the Java version that Flutter is using for Gradle. │
│ │
│ To fix this issue, first, check the Java version used by Flutter by running flutter doctor –verbose. │
│ │
│ Then, update the Gradle version specified in │
│ /Users/mac/Documents/GitHub/salesfine/android/gradle/wrapper/gradle-wrapper.properties to be compatible with that Java │
│ version. See the link below for more information on compatible Java/Gradle versions: │
│ https://docs.gradle.org/current/userguide/compatibility.html#java
I have just hit the same issue – my resolution was a little simpler:
Just like you, I have Android Studio installed, the key is to install Android SDK Command-line Tools, steps being:
Open Android Studio
- Tools Menu, SDK Manager
- In the window that comes up there are inner panels, choose SDK Tools panel
- Tick Android SDK Command-line Tools
- Choose Apply button near the bottom of the window
- At that point, you will be prompted to accept the SDK license and the command line tools will be installed. Your license issue should now be resolved.
FYI, the command line tools will add a new folder cmdline-tools inside your SDK Folder. If you look in there cmdline-tools/latest/bin you will see sdkmanager – but your license issue should already be resolved.
thanks to
Flutter doctor error – Android sdkmanager tool not found. Windows