When I run flutter doctor --verbose from command line I get 0 issues as seen here :
flutter doctor success,
flutter doctor success --verbose
When I open my pubspec.yaml file in android studio and click the flutter doctor command from the Flutter commands line that appears I get 1 issue with android tool chain. Specifically the Android SDK location. I'm not sure how to proceed. I would love to work within AndriodStudio and use the built-in logging functionality. Any help is greatly appreciated. Here is image of the Flutter doctor failing : flutter doctor failing. Here is an image of the Flutter commands available when pubspec.yaml is open : flutter commands
I imagine fixing this will also fix the devices not found issue I'm experiencing as well. Again, from the command line all of my devices are found and I can launch my flutter application on my phone and virtual device but in andriod studio there are no devices found by flutter... Ty ty friends.
Just had to set sdk location again after restarting. This also fixed the devices not found issue.
I manually install(double click on downloaded pakage -> install button in my linux mint) Android Studio. Setted up the environment. And then i tried to run
npx react-native run-android
i got "No SDK found at the specified location" and "No emulators found". But i could run emulator manually in Android Studio with some example projects.
I suffered couple hours. And from command flutter doctor -v i saw diferent pathes
Android SDK at /usr/lib/android-sdk
Android Studio at /opt/android-studio
These paths are different from those where I installed. My SDK at /home/some_word/android/sdk path for example.
And editing $PATH in the .bashrk and .profile files doesn't change the paths I've seen in flutter doctor.
So how can i change this old program pathes?
Or how do I securely uninstall a program so that its paths are completely cleared?
it's enough to completely unistall
sudo apt-get purge package_name
When I do "flutter doctor" on cmd this is the error I receive:
where' is not recognized as an internal or external command operable program or batch file unable to locate git
Note that git --version gives me git version 2.28.0.windows.1
These are the things I tried
1.Reinstalling git
2.Updating Powershell to 5.0 as I run windows 7 SP1 and flutter requires Powershell 5.0 and greater
3.Tries resetting path variables
Here are my path variables.
USER ENV VAR:
C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\DELL\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\DELL\AppData\Roaming\npm;C:\src\flutter\bin
SYSTEM ENV VAR:
C:\Program Files\Java\jdk-14\bin;%PYTHON_HOME% ; C:\Users\DELL\AppData\Local\Programs\Python\Python37;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Git\bin\git.exe;C:\Windows\System32 ;%systemroot%\System32\WindowsPowerShell\v1.0\
I am not able to find where exactly I am going wrong.
I am new to this.Any help would be appreciated.I have been trying this from 3 days nothing helps.
UPDATE
ADDING FLUTTER PATH TO SYSTEM VARIABLE WORKED FOR ME . Though now I have another set of issues as you can see in the image.I have android studio installed ; Have installed the dart and flutter plugin.Still I am getting the error
Make sure this path of flutter %/flutter/bin exists in the environment variable and you have restarted the terminal (maybe the system also).
Update :
Can You run flutter doctor -v using flutter_console and show us the error message:
Comparing with my enviroment variables it seems like you don't have java jdk installed, otherwise i see no problem . However i will share my variables . Another way of finding what is wrong is opening cmd in the flutter folder and lanuching flutter_console.bat inside the cmd, that way it will not close and it will show the error if there is any
USER ENV:
C:\Users\USER\AppData\Local\Microsoft\WindowsApps;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Users\USER\AppData\Local\Programs\Microsoft VS Code\bin;D:\flutter\bin;C:\Users\USER\.gradle\wrapper\dists\gradle-6.1.1-all\cfmwm155h49vnt3hynmlrsdst\gradle-6.1.1\bin;C:\Program Files\Java\jdk1.8.0_261\bin;C:\Users\USER\AppData\Local\Android\Sdk\tools\bin;
SYSTEM ENV:
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%SYSTEMROOT%\System32\OpenSSH\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Git\cmd
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.
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.