I was also tackling the same issue for an entire day. I searched on StackOverflow, GitHub, Medium and other sites to find the solution to this problem but the thing that worked for me was uninstalling Java JDK version 14 and reinstalling JDK version 8.
I don't want anyone to go through the same issue so I'm posting the detailed solution that worked for me.
When I executed the flutter doctor
command in my CMD, the doctor showed me these summaries.
flutter doctor --android-licenses
and sdkmanager --licenses
to accept the license agreement but after executing both threw the same exception.I also tried to revert back my Java installation but that created a total mess for me.
These are the Android Studio SDKs that I've installed. I've read in many articles and threads that API level 29 Android 10.0 (Q) must be installed so I downloaded it and the physical device I've connected to is running Android 9 (Pie) so I've downloaded that as well.
I've downloaded and installed these SDK tools.
After that, I've uninstalled my Java JDK version 14 installation and installed JDK version 8 and set the
JAVA_HOME
and PATH
environmental variables and restarted my PC.By doing so the
flutter doctor
showed these summaries.After running
flutter doctor --android-licenses
it showed these summaries.
0 意見:
張貼留言