I use flutter to develop windows desktop programs, I installed visual studio 2019 enterprise, fully installed, more than 50G. I just installed the part that can change the path on the D drive. But after executing flutter doctor, why does the following prompt appear?
error:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel dev, 1.23.0-7.0.pre, on Microsoft Windows [Version 10.0.18363.1082], locale zh-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[!] Visual Studio - develop for Windows (Visual Studio Enterprise 2019 16.0.0)
X The current Visual Studio installation is incomplete. Please reinstall Visual Studio.
[√] Android Studio (version 4.0)
[!] IntelliJ IDEA Community Edition (version 2019.3)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] IntelliJ IDEA Ultimate Edition (version 2018.1)
[√] Connected device (1 available)
! Doctor found issues in 3 categories.
That specific error message from doctor means that the vswhere tool is reporting false for the isComplete property. This means there is an issue with your Visual Studio installation (or at least, Microsoft's tooling believes there is).
Related
I am trying to execute a .gitlabci.yml file with Gitlab Runner.
But I am getting this error message.
No dependencies changed.
1 package is discontinued.
57 packages have newer versions incompatible with dependency constraints.
Try `dart pub outdated` for more information.
Running "flutter pub get" in tardis...
The current Flutter SDK version is 0.0.0-unknown.
Because newApp depends on workmanager >=0.2.3 which requires Flutter SDK version >=1.10.0, version solving failed.
In short gitlab runner cannot detect my flutter version.
My flutter doctor screen:
[√] Flutter (Channel stable, 2.10.5, on Microsoft Windows [Version 10.0.19044.1766], locale tr-TR)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.1)
[√] Android Studio (version 2020.3)
[√] VS Code (version 1.68.1)
[√] Connected device (3 available)
[√] HTTP Host Availability
• No issues found!
How can i fix this?
Solved this problem. Perhaps, the GitLab runner cannot detect my flutter version because of the flutter SDK location. I moved the SDK from drive D to drive C and specified the new environment variable path. It works fine now.
I'm new to flutter, and I'm trying to build a flutter environment on windows 11, but when I type flutter doctor even though I have android studio, I get an error like the one below. I would appreciate it if someone could tell me what's going on!
PS C:\> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.22000.376], locale ja-JP)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[!] Android Studio
✗ android-studio-dir = C:\Program Files\Android\Android Studio
✗ Unable to find bundled Java version.
[✓] VS Code (version 1.62.3)
[✓] Connected device (2 available)
Brother PLz Apply All these instructions Given in the Link below, Your problem will be solved.
https://stackoverflow.com/questions/52014476/unable-to-locate-the-android-sdk/52018999#52018999
I replaced flutter folder with an older version then Visual Studio Code stopped showing available devices ("No device" not clickable) when I click to run my app so I have to manually start the emulator on Android Studio (AVD) for Visual Studio Code to connect. Before the downgrade everything worked fine and I didn't have to open android studio for Visual Studio Code to connect to emulators.
flutter doctor :
C:\Users\Workstudio>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft Windows [Version 10.0.19042.928], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Android Studio (version 3.5)
[√] VS Code, 32-bit edition (version 1.57.1)
[!] Connected device
! No devices available
! Doctor found issues in 1 category.
Things I've tried:
Reinstall HAXM.
adb server-kill & adb server-start
checked environmental variables(paths & Android home).
Updating Android SDK.
i have installed latest version of android studio and flutter.
but when i run flutter doctor -v it shows following error [!] Android Studio (not installed)
flutter doctor output:
[√] Flutter (Channel stable, 2.2.0, on Microsoft Windows [Version 10.0.19043.985], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[!] Android Studio (not installed)
[√] VS Code (version 1.56.2)
[√] Connected device (2 available)
! Doctor found issues in 1 category.
PS: flutter & dart plugins installed!
If android studio is installed correctly you can run the following command to change the path of android-studio installation:
flutter config --android-studio-dir="ANDROID STUDIO PATH HERE"
after this open a new terminal and run flutter doctor and you should see [√] Android Studio (version x.x.x)
you can install flutter&dart plug,and then restart.
android studio is installed correctly you can run the following command to change the path of the android-studio installation: >flutter config --android-studio-dir="C:\Program Files\Android\Android Studio" // please use your Android Studio Path.
I am running flutter doctor command. But it is saying android studio is not installed many times. I tried flutter config --android-studio-dir=/home/khamidjon/.android, and many more paths I tried to show but to no luck.
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.1, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Chrome - develop for the web
[!] Android Studio
✗ android-studio-dir = /home/khamidjon/.android
✗ Unable to find bundled Java version.
[✓] IntelliJ IDEA Community Edition (version 2020.3)
[✓] Connected device (1 available)
! Doctor found issues in 1 category.
My question is what location should be shown for PATH in flutter config --android-studio-dir='PATH'?
For Android Studio installed with Flatpak, i found this config to work:
flutter config --android-studio-dir=/path/to/home/.local/share/flatpak/app/com.google.AndroidStudio/current/active/files/extra/android-studio
Where path/to/home is the path to your home directory.
(Ubuntu 21.10/Pop!_OS)
Snap packages are installed under /snap/appname/ with subdirectories for each new version. Try this to reslove the issue, it worked for me.
flutter config --android-studio-dir="/snap/android-studio/current/android-studio"
The current directory will make sure that it always points to the latest version.
if you have Androind Studio installed in your home directory /home/khamidjon set up PATH like this: /home/khamidjon/android-studio/bin
to append variable in Linux use command
export PATH=$PATH:/some/new/path
to check your PATH use
echo $PATH
In my case snap packages can retain old versions of the program. So inside /snap/android-studio There were 2 versions of android studio inside directories /snap/android-studio/99 and /snap/android-studio/100. So I showed one of these paths: directory /snap/android-studio/100/android-studio with latest version.
So I ran:
flutter config --android-studio-dir=/snap/android-studio/100/android-studio
flutter doctor
Result:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.1, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Chrome - develop for the web
[✓] Android Studio
[✓] IntelliJ IDEA Community Edition (version 2020.3)
[✓] Connected device (2 available)
• No issues found!
In windows
if your Android Studio install by default, you can use this command
flutter config --android-studio-dir="C:\Program Files\Android\Android Studio"
after this command, flutter can found android studio, but the plugin can't...
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.20.2, on Microsoft Windows [Version 10.0.18363.1016], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[!] Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.48.0)
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
In Linux (Ubuntu)
Note: for those who are facing the problem in Ubuntu and Android Studio is installed with snap:
flutter config --android-studio-dir="/snap/android-studio/current/android-studio"
Note: for those who are facing the problem in Ubuntu and Android Studio is installed with JetBrains Toolbox:
flutter config --android-studio-dir=/home/myuser/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.7042882
Where ./201.7042822 matches the current version of Android Studio installed. You'll have to check which one you have and update it in the command above.