Why does Flutter Doctor not find an option named "android --licences" - android

I am trying to complete the install of Flutter. Within the Flutter help, it has an option called "Flutter doctors android --licences" However, when you run it, Flutter does not recognise it's own option.
Running Windows 10. I installed from the Zip folder. And have installed Android Studio.
When I run c:> flutter doctor android--licences I get an error
could not find an option named "android --licences"
Both Flutter and Android studio have been added to my path.
I have run $ flutter config --android-sdk "C:\Users\vince\AppData\Local\Android\Sdk"
I have tried running sdkmanager --update from inside the Android sdk folder as well as inside the bin folder to no avail.
I have checked innumerable posts on SO as well as GIT. All without success.
Any suggestion is welcome. Thanks.

Mate, try --android-licenses NO android --licences (mind your spelling. s not c)

close the terminal you're using and go to your flutter installation folder
find a .bat file named flutter_console.bat click it to run it once again and just right the below command
flutter doctor --android-licenses
Hope it will help :)

Try flutter doctor -v which gives more details.
This will enable you to see the particular licences that are not accepted.
You can now run flutter doctor --android-licenses to accept them one by one by typing y (for yes) each time.

Related

Android sdkmanager not found

I want to use flutter but I am getting this while running flutter doctorError
I have cmdline tools install as seen in below picture
android sdk tools
But when I use command "flutter doctor --android-licenses"
It is showing sdkmanager not found:-Sdkmanagernot found error
I have tried literally everything mentioned on internet to remove this error but nothing works
// try to set
flutter config --android-sdk <path-to-your-android-sdk>

flutter doctor --android-licenses Error: Could not find or load main class Studio

I've already tried reinstalling Android Studio, AndroidSDK, all the tools for the SDK, Flutter, and configuring the Environment Variables.
I've also tried using sdkmanger -licenses but it still comes with the same error.
Error
Thank you for the help!
If I remember correct following is what worked for me.
Execute command prompt as administrator.
Run the command flutter doctor --android-licenses and accept all licenses.
Run the command flutter doctor -v to check if the issue was solved.
To make sure that is everything is ok, execute the command prompt as a regular user (your user) and execute flutter doctor -v again.

Can't Install flutter android licenses

I am not able to accept the flutter android licenses
after I run the command flutter doctor --android-licenses, I get the error as
Error: Could not find or load main class Rathi\AppData\Local\Android\Sdk\cmdline-tools\latest\bin\\..
Also I have installed the flutter plugins in Android Studio still error is showing up that the plugins are not installed
First try to Execute command prompt as administrator.
Otherwise, try : (your android_sdk folder exact path)\tools\bin\sdkmanager --licenses

Flutter waiting for devices

today I start download flutter but I can't use any commands in the Windows cmd. When I write flutter doctor or flutter, I get < waiting for any device > always.
Flutter is installed in C:/flutter and I add flutter to PATH
Also I check if my device have a problem and with the adb device command I get my devices.
On Android Studio I can't create a project because of this error but with the normal Android Java Project I see my device
Every flutter command not work
flutter doctor
flutter doctor -v
flutter create my_project
flutter help
nothing
Did you follow all of the install instructions correctly?
Try adding your flutter directory to your PATH.
I guess you have to change the location of your flutter installation to a directory where admin privileges are not required, such as your directory or on your user home directory.
You are putting it directly in the C: which is completely wrong 😅.
Don't forget to change the PATH
Good Luck 👾

Unity build error. [Failed to install the following Android SDK packages as some licences have not been accepted. ]

After I carried out some commands below on terminal to test my unity app with android emulators. My Unity project started failing build over and over again due to the same error in the pics below. If there is anybody who are familiar with this issue, would you give me advice to address it?
The command I carried out on terminal
1, export PATH=$PATH:/Users/userName/Library/Android/sdk/platform-tools
2, echo PATH=$PATH: /Users/userName/Library/Android/sdk
3, cd /Users/userName/Desktop/AppName.apk
4, adb install AppName.apk
The details of the error
enter image description here
enter image description here
For people who may face the same errors in the future,
The problem was there is no licences file in /Users/username/Desktop/2019.2.9f1/PlaybackEngines/AndroidPlayer/SDK.
So I copied the file from /Users/username/Library/Android/sdk and paste it to the unity directory above.
The errors was successfully addressed.
I wish nobody wasted their time anymore because of this error.
Open command prompt as admin and run
{path_to_sdk_folder}/tools/bin/sdkmanager.bat --licenses
and accept all.
If anyone else happens to run into this problem, and you are using Unity Hub, run the following command from Terminal.
$ find /Applications/Unity/Hub/Editor -name "sdkmanager" -exec {} --licenses \;
This will find all of the installed SDKs and check that all licenses are accepted. If they aren't, you will be prompted to accept.
You can run the command again to double-check everything is 100%.
Keep bumping into this now Unity manages the platforms, Android Studio then grumbles about it if you point Android Studio at the platforms location Unity is using.
On Windows the quick and dirty fix is to run Android Studio as administrator, it then does what it needs and you can then go back to running Android Studio normally.
Not sure what the effects are long term, but it appears to work for me. Especially as I am not using the platform that Android Studio is grumbling about.
However, clearly, this isn't a great solution as the SDK manager in Android Studio doesn't see the platforms Unity claims to have installed.
On a Windows machine, you'll need to find your sdkmanager.bat for your current version of Unity. For you this location could be something like
C:\Program Files\Unity\<version>\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\bin\sdkmanager.bat
or
C:\Program Files\Unity\Hub\Editor\<version>\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\bin\sdkmanager.bat
Once you find this, you can execute it with the --licenses flag in Powershell or your shell of choice, like below. Make sure that you run your shell as an administrator.
.\sdkmanager.bat --licenses
You'll then be prompted to review any licenses that have yet to be accepted. Answering y to these will resolve the issue.
Kotaro is right.
For people who may face the same errors in the future,
The problem was there is no licences file in /Users/username/Desktop/2019.2.9f1/PlaybackEngines/AndroidPlayer/SDK.
So I copied the file from /Users/username/Library/Android/sdk and paste it to the unity directory above.
The errors was successfully addressed.
I wish nobody wasted their time anymore because of this error.
Cant comment so :
This is correct but make sure you open CMD with admin privileges as it wont save the licenses!
Go to src -> flutter -> flutter -> flutter_console
and type flutter doctor --android-licenses. Click y.

Categories

Resources