Why do I get these VS Code errors after running flutter doctor:
Waiting for another flutter command to release the startup lock...
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 10.0.17134.112], locale hu-HU)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.0)
[√] Android Studio (version 3.1)
[!] VS Code, 32-bit edition
[!] VS Code, 64-bit edition (version 1.24.1)
[!] Connected devices
! No devices available
! Doctor found issues in 3 categories.
exit code 0
The current release of flutter does not properly detect the VSC extension because of case sensitivity errors. If it shows up in VSCode, it's installed. Ignore Flutter Doctor. :)
There could be several reasons for this, but the most likely cause is that you have VS Code installed but not the Flutter extension.
I get the same:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel dev, v0.5.4, on Microsoft Windows [Version 10.0.17134.112], locale en-GB)
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[√] Android Studio (version 3.1)
[√] IntelliJ IDEA Community Edition (version 2017.2)
[√] IntelliJ IDEA Community Edition (version 2018.1)
[!] VS Code, 32-bit edition
[!] VS Code, 64-bit edition (version 1.22.2)
[!] Connected devices
! No devices available
! Doctor found issues in 3 categories.
Run flutter doctor -v for more details as it tells you to in the error message:
[√] Flutter (Channel dev, v0.5.4, on Microsoft Windows [Version 10.0.17134.112], locale en-GB)
• Flutter version 0.5.4 at C:\VirtualDrives\Programs\flutter
• Framework revision 3019ad976d (11 days ago), 2018-06-11 11:31:25 -0700
• Engine revision d33bbff470
• Dart version 2.0.0-dev.60.0.flutter-a5e41681e5
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at C:\VirtualDrives\Programs\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• ANDROID_HOME = C:\VirtualDrives\Programs\Android\sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
• All Android licenses accepted.
[√] Android Studio (version 3.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 25.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[√] IntelliJ IDEA Community Edition (version 2017.2)
• IntelliJ at C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2017.1
• Flutter plugin version 19.1
• Dart plugin version 172.4343.25
[√] IntelliJ IDEA Community Edition (version 2018.1)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.1
• Flutter plugin version 25.0.2
• Dart plugin version 181.4892.1
[!] VS Code, 32-bit edition
• VS Code at C:\Program Files (x86)\Microsoft VS Code
• Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[!] VS Code, 64-bit edition (version 1.22.2)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[!] Connected devices
! No devices available
! Doctor found issues in 3 categories.
Related
Please see flutter doctor output below. I am not sure how to fix the issue under android studio.
Everything is latest and fresh installed.
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.10, on Microsoft Windows [Version 10.0.19044.2486], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.22)
[!] Android Studio (version 2022.1)
X Unable to find bundled Java version.
[√] VS Code (version 1.74.3)
[√] Connected device (3 available)
[√] HTTP Host Availability
Flutter doctor -v
Flutter (Channel stable, 3.3.10, on Microsoft Windows [Version 10.0.19044.2486], locale en-US)
• Flutter version 3.3.10 on channel stable at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 135454af32 (4 weeks ago), 2022-12-15 07:36:55 -0800
• Engine revision 3316dd8728
• Dart version 2.18.6
• DevTools version 2.15.0
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\rupena\AppData\Local\Android\sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: C:\Program Files (x86)\Java\jre1.8.0_271\bin\java
• Java version Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.22)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
• Visual Studio Build Tools 2019 version 16.11.33130.400
• Windows 10 SDK version 10.0.19041.0
[!] Android Studio (version 2022.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
X Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[√] VS Code (version 1.74.3)
• VS Code at C:\Users\rupena\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.32.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19044.2486]
• Chrome (web) • chrome • web-javascript • Google Chrome 108.0.5359.126
• Edge (web) • edge • web-javascript • Microsoft Edge 108.0.1462.76
[√] HTTP Host Availability
• All required HTTP hosts are available
I tried updating Android studio. I also checked JAVA environment variable value and I do have that path in the system.
JAVA_HOME is C:\Program Files (x86)\Java\jre1.8.0_271 in the environment variable.
Post here was helpful to solve the issue: https://github.com/flutter/flutter/issues/118502
Flutter [!] Android Studio (version 2022.1) X Unable to find bundled Java version
To add, perhaps this will help you in resolving your issue with the same question posted.
I'm working on migrating Google Play Billing to 5.0.0 by using Flutter in_app_purchase 3.0.7 as I raised the question here. Migrate to Billing 5.0.0
It seems that Play Console still raises warning with in_app_purchase 3.0.7. The workaround is to add com.google.android.play.billingclient.version in AndroidManifest.xml as mentioned here link. When I did that, it got rid of the warning but unfortunately it causes App crashes with following error:
E/AndroidRuntime( 9885): java.lang.NoSuchMethodError: No virtual method setReplaceSkusProrationMode(I)Lcom/android/billingclient/api/BillingFlowParams$Builder; in class Lcom/android/billingclient/api/BillingFlowParams$Builder; or its super classes (declaration of 'com.android.billingclient.api.BillingFlowParams$Builder' appears in /data/app/~~T2Kh46nWychg2xWUZiO5EA==/com.blueedgez.paintover-IPoCtqgP0Ez5df07rfzPyw==/base.apk!classes2.dex)
E/AndroidRuntime( 9885): at io.flutter.plugins.inapppurchase.MethodCallHandlerImpl.launchBillingFlow(MethodCallHandlerImpl.java
I tried with Billing version 4.0.0 but got the same error.
I cleaned all the cache before I executed the build and this is what flutter doctor looks like.
[√] Flutter (Channel stable, 3.3.4, on Microsoft Windows [Version 10.0.18363.592], locale en-US)
• Flutter version 3.3.4 on channel stable at C:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision eb6d86ee27 (6 days ago), 2022-10-04 22:31:45 -0700
• Engine revision c08d7d5efc
• Dart version 2.18.2
• DevTools version 2.15.0
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at C:\Users\Jay\AppData\Local\Android\sdk
• Platform android-33, build-tools 32.0.0
• Java binary at: C:\Program Files\Android\Android Studio1\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[!] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.1)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.2.32516.85
X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++"
workload, and include these components:
MSVC v142 - VS 2019 C++ x64/x86 build tools
- If there are multiple build tool versions available, install the latest
C++ CMake tools for Windows
Windows 10 SDK
[√] Android Studio (version 2020.3)
• Android Studio at C:\Program Files\Android\Android Studio2
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[√] Android Studio (version 4.1)
• Android Studio at C:\Program Files\Android\Android Studio1
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[√] VS Code (version 1.64.2)
• VS Code at C:\Users\Jay\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.17.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.18363.592]
• Chrome (web) • chrome • web-javascript • Google Chrome 106.0.5249.103
• Edge (web) • edge • web-javascript • Microsoft Edge 104.0.1293.70 (unsupported)
[√] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
Appreciate any feedback.
As you can see, there is only Windows debug.
I removed android and ios folders so it is not strange not to see them, but it's strange that I can't see Chrome.
Why there is only Windows (desktop)? Any way to debug with Chrome (or Edge)?
flutter doctor -v
[√] Flutter (Channel stable, 2.10.5, on Microsoft Windows [Version 10.0.22000.675], locale ja-JP)
• Flutter version 2.10.5 at C:\Flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5464c5bac7 (4 weeks ago), 2022-04-18 09:55:37 -0700
• Engine revision 57d3bac3dd
• Dart version 2.16.2
• DevTools version 2.9.2
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at C:\Users\yukik.000\AppData\Local\Android\sdk
• Platform android-32, build-tools 32.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.11)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.11.32228.343
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2020.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[√] VS Code (version 1.67.1)
• VS Code at C:\Users\yukik.000\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.40.0
[√] Connected device (1 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.675]
[√] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
Wasn't [√] Chrome installed here before?
Try to run below command if your project is not web enabled or not Web folder inside your project
flutter config --enable-web
Then restart VsCode and run your project with available device Chrome or Edge.
In the image above you can see that the whole dart code is showing white lines and this happened after my laptop accidently turned off while I was running the code.
The first error it gave was corrupted .git/packed-ref file which i fixed but this one isn't going away, other file type is showing their repective color theme only the .dart file is doing this. and also dart analyzer isn't working too
//Flutter doctor -v
[√] Flutter (Channel stable, 2.8.0, on Microsoft Windows [Version 6.3.9600], locale en-US)
• Flutter version 2.8.0 at D:\flutter\Sdk\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision cf44000065 (8 weeks ago), 2021-12-08 14:06:50 -0800
• Engine revision 40a99c5951
• Dart version 2.15.0
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc2)
• Android SDK at C:\Users\bright\AppData\Local\Android\sdk
• Platform android-31, build-tools 31.0.0-rc2
• Java binary at: C:\Program Files\Android\Android Studio1\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
• All Android licenses accepted.
[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[√] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio1
• Flutter plugin version 44.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[√] VS Code (version 1.63.2)
• VS Code at C:\Users\bright\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.34.0
[√] Connected device (1 available)
• Edge (web) • edge • web-javascript • Microsoft Edge 97.0.1072.69
! Doctor found issues in 1 category.
I don't exactly know what the problem is, since it isn't showing me any error. Please what do i do?
I think there is something wrong with the Dart extension (perhaps some files are corrupt), but uninstalling/re-installing it does not remove the files from disk and re-download it.
I would try uninstalling the Dart extension, then go into your %USERPROFILE%\.vscode\extensions folder and delete any dart-code.dart-code folders, and then re-launch VS Code and re-install it.
If that doesn't solve it, please file an issue at https://github.com/Dart-Code/Dart-Code. Thanks!
Initially this code is correct but after I reinstalled Windows and its applications, the project that was correct is now an error.
My project error
flutter doctor -v :
[√] Flutter (Channel dev, 1.26.0-1.0.pre, on Microsoft Windows [Version 10.0.19042.804], locale en-US)
• Flutter version 1.26.0-1.0.pre at F:\src\flutter
• Framework revision 63062a6443 (9 weeks ago), 2020-12-13 23:19:13 +0800
• Engine revision 4797b06652
• Dart version 2.12.0 (build 2.12.0-141.0.dev)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at F:\src\Android\Sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code (version 1.53.2)
• VS Code at C:\Users\hyda\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.19.0
[√] Connected device (1 available)
• sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
• No issues found!
The error you get is because the libraries are not loaded. First, go to the pubseck.yaml file and get the packages there. If still not working see this command
-> flutter clean
-> flutter pub get
Such problems can be solved by running this command:
flutter clean
Once that is done, go to pubspec.yaml and check if all the packages are still there. For cross-checking, run:
flutter pub get
This will solve your problem.