0

I've been trying to solve this error since one day.
First I got this error

Exception: Android sdkmanager tool not found (/ usr / lib / android-sdk / tools / bin / sdkmanager).
Try re-installing or updating your Android SDK,
visit https://flutter.io/setup/#android-setup for detailed instructions.

Here is a Screenshot

I tried to solve this error but couldn't solve it and I deleted Android Studio completely (sdk, gradle, .android ... etc). I reinstalled and flutter I got this error when I wrote doctor. New errors Screenshot

C:\Users\Fatihh>flutter doctor --android-licenses
Warning: File C:\Users\Fatihh\.android\repositories.cfg could not be loaded.
4 of 7 SDK package licenses not accepted. 100% Computing updates...
Review licenses that have not been accepted (y/N)?
C:\Users\Fatihh>

Finally I made the decision to write here. I need help. Android studio version:4.1.1 OS :Win 10 Flutter SDK :1.22.5 Android SDK:30.3

dm_tr
  • 4,265
  • 1
  • 6
  • 30
Fatih
  • 91
  • 1
  • 9

1 Answers1

0

First, open Android Studio and install Flutter and Dart plugins on it.
Then run the command flutter doctor --android-licenses
Finally, clean your project, make sure packages are installed and run it

flutter clean
flutter pub get
flutter run
dm_tr
  • 4,265
  • 1
  • 6
  • 30
  • I deleted the plugins and reinstalled. However, the command "flutter doctor --android-licenses" did not work again. After the command "flutter doctor --android-licenses" I can't proceed. – Fatih Jan 02 '21 at 20:01
  • "C:\Users\Fatihh>flutter doctor --android-licenses Warning: File C:\Users\Fatihh\.android\repositories.cfg could not be loaded.[================ ] 42% Fetch remote repository... 4 of 7 SDK package licenses not accepted. 100% Computing updates... Review licenses that have not been accepted (y/N)?" It types like this and then switches to the new command line before I can press y – Fatih Jan 02 '21 at 20:03
  • Do you have an idea? I'm thinking of resetting the computer as a last resort – Fatih Jan 03 '21 at 20:58
  • Manually create the file `repositories.cfg` under `C:\Users\Fatihh\.android` – dm_tr Jan 03 '21 at 21:00
  • Tried and .cfg error gone but still not accepting licenses ----- -4 of 7 SDK package licenses not accepted. 100% Computing updates... Review licenses that have not been accepted (y/N)? – Fatih Jan 03 '21 at 21:04
  • Run the command `flutter doctor --android-licenses` and on prompt confirm by `Y` – dm_tr Jan 03 '21 at 21:05
  • Doesn't let me press y switch to new line .I tried pressing y repeatedly while installing the license, but it still didn't – Fatih Jan 03 '21 at 21:11
  • Do not copy paste. Write it yourself and press Enter – dm_tr Jan 03 '21 at 21:12
  • I wrote the command "flutter doctor --android-licenses" myself, but it did not work. – Fatih Jan 03 '21 at 21:16
  • After giving this error it skips to 1 line and then this line comes before I let me press y. "C: \ Users \ Fatihh>" – Fatih Jan 03 '21 at 21:17