Reputation: 11
I got 3 errors while installing flutter : [!] Android toolchain - develop for Android devices (Android SDK 27.0.3) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Android Studio
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
I can install plugin(s) in android studio but how to resolve android licenses problem , I ran "flutter doctor --android-licenses" it shows all the licenses how to know which license is not accepted and how to resolve it
Thanks in advance
Upvotes: 1
Views: 973
Reputation: 140
If flutter doctor --android-licenses
don't work then I would recommend to export to java 8 instead of java 10. It worked for me
Upvotes: 0
Reputation: 2301
Its very simple to install flutter, just you have to follow some steps.
The first and foremost thing, you need to have a OS (LINUX, MAC, WINDOWS) and a editor. If you are using Linux as OS and Android studio/ intellij platform, you can proceed with below mention steps.
1.1. setup an editor, i would prefer android studio. 1.2. Start Android Studio. 1.3. Open plugin preferences (Preferences > Plugins on macOS, File > Settings > Plugins on Windows & Linux). 1.4. Select Browse repositories, select the Flutter plugin and click Install. 1.5. Click Yes when prompted to install the Dart plugin. 1.6. Click Restart when prompted.
Next, install flutter SDK,
2.1. goto ths link : https://flutter.io/docs/get-started/install/linux
here you will find the flutter stable version as a .tar.gz, download this to your download folder(ex.)
2.2. open terminal paste this: tar xf ~/Downloads/flutter_linux_v1.0.0-stable.tar.xz
2.3.press enter. It will extract and make a folder name "flutter"
note*: that folder is installation folder, if you delete this, your flutter installation is gone, you need to reinstall (step 2.1, 2.3)
2.4 Add the flutter tool to your path: (paste in terminal)
export PATH="$PATH:pwd
/flutter/bin"
This command sets your PATH variable for the current terminal window only. To permanently add Flutter to your path
2.5 write in terminal: flutter doctor
it will show some infos, scroll down, it will show the require things needed.
for my case, i had to install this: sudo apt-get install lib32stdc++6
and accepted the licenses : flutter doctor --android-licences
Next, open android studio, make new project
3.1 Select File > New Flutter Project. 3.2 Select Flutter application as the project type, and press Next. 3.3 Make sure that the Flutter SDK Path text field specifies the location of the SDK. 3.4 Enter a project name (for example, myapp), and press Next. 3.5 Click Finish.
Then you are done :) For other platforms, the basic installation idea is same as this, you can go through the flutter official doc.
Upvotes: 1
Reputation: 544
after making sure you've updated your sdk and installed flutter and dart plugin restart your Android studio then run in order
flutter doctor
then
flutter doctor --android-licenses
then press yes
Upvotes: 0
Reputation:
Did you complete the additional task to be completed as reported with flutter doctor
command?
Could we see the full output from flutter doctor
and flutter doctor --android-licenses
respectively?
See Run flutter doctor
section under Get Started: Install.
Upvotes: 0