Closed ansidev closed 3 years ago
Relate issue: https://github.com/flutter/flutter/issues/72101
Hi @ansidev, It looks like you have two versions of Android studio installed and probably there is an issue with adb could you please share the screenshot of Android Studio settings by going to sdk settings => Android Sdk=> sdk tools.
Hi @ansidev, It looks like you have two versions of Android studio installed and probably there is an issue with adb could you please share the screenshot of Android Studio settings by going to sdk settings => Android Sdk=> sdk tools.
The current workaround solution: restart OS.
Do you mean each time you restart the OS the error does not occur?
Can you also try resinstalling
by uncheck => apply and recheck => apply on those two items
then please share the output of
flutter doctor -v
@maheshmnj
The following log is the output while flutter is working.
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale en)
• Flutter version 2.2.3 at /Users/mac/tools/flutter
• Framework revision f4abaa0735 (4 weeks ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4
[!] Android toolchain - develop for Android devices
• Android SDK at /Users/mac/Library/Android/sdk
✗ 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/macos#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.
• ANDROID_HOME = /Users/mac/Library/Android/sdk
• ANDROID_SDK_ROOT = /Users/mac/Library/Android/sdk
✗ No valid Android SDK platforms found in /Users/mac/Library/Android/sdk/platforms. Candidates were:
- android-22
- android-31
- android-30
- android-29
- android-28
• Try re-installing or updating your Android SDK,
visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.5.1, Build version 12E507
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• 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
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[✓] Android Studio (version 4.2)
• Android Studio at /Users/mac/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/202.7351085/Android Studio.app/Contents
• 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.8+10-b944.6916264)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.1.3)
• IntelliJ at /Users/mac/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
• Flutter plugin version 58.0.3
• Dart plugin version 211.7665
[✓] VS Code (version 1.58.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.24.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 11.4 20F71 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.107
! Doctor found issues in 2 categories.
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale en)
• Flutter version 2.2.3 at /Users/mac/tools/flutter
• Framework revision f4abaa0735 (4 weeks ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/mac/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• ANDROID_HOME = /Users/mac/Library/Android/sdk
• ANDROID_SDK_ROOT = /Users/mac/Library/Android/sdk
• Java binary at: /Users/mac/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/202.7351085/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.5.1, Build version 12E507
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• 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
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[✓] Android Studio (version 4.2)
• Android Studio at /Users/mac/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/202.7351085/Android Studio.app/Contents
• 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.8+10-b944.6916264)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.1.3)
• IntelliJ at /Users/mac/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
• Flutter plugin version 58.0.3
• Dart plugin version 211.7665
[✓] VS Code (version 1.58.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.24.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 11.4 20F71 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.107
! Doctor found issues in 1 category.
@ansidev, The issue is more likely because after installing cloud flare probably its modifying the path variable and the sdk path is not being located, could you try running
echo $PATH
before and after installing cloudflare to ensure the sdk path remains unmodified
Also this how you can set the path to you android sdk using the flutter cli https://stackoverflow.com/a/52926825/8253662
@ansidev you're not alone with this issue.
I also used CloudFlare WARP and got this issue.
I recently have deleted CloudFlare WARP not to interrupt my work and am following this issue to catch a reason why it happened.
Thank you in advance @maheshmnj, you're the kindly man.
After some tests, I confirm that the problem comes from CloudFlare WARP. So I will close this issue.
@ansidev you're not alone with this issue.
I also used CloudFlare WARP and got this issue.
I recently have deleted CloudFlare WARP not to interrupt my work and am following this issue to catch a reason why it happened.
Thank you in advance @maheshmnj, you're the kindly man.
The problem is if you turn on WARP mode, your computer will connect to the internet via VPN. But after that, if you turn off WARP mode, something relates to network config was not reverted and any application cannot connect to localhost (flutter, docker,...). So the flutter daemon cannot start or continue to work normally.
glad you found the cause :)
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
Environment:
OS: macOS BigSur 11.4 IDE: Android Studio Arctic Fox 2020.3.1 Simulator: iOS Simulator
Steps to Reproduce
Additional information
After the error was occurred, Docker cannot work normally because Docker containers cannot not discover the other ones, so I think this issue relates to network/proxy.
The current workaround solution: restart OS.
Logs
Logs
1. Run `flutter doctor -v` ```log [✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale en) • Flutter version 2.2.3 at /Users/mac/tools/flutter • Framework revision f4abaa0735 (4 weeks ago), 2021-07-01 12:46:11 -0700 • Engine revision 241c87ad80 • Dart version 2.13.4 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /Users/mac/Library/Android/sdk • Platform android-31, build-tools 30.0.3 • ANDROID_HOME = /Users/mac/Library/Android/sdk • ANDROID_SDK_ROOT = /Users/mac/Library/Android/sdk • Java binary at: /Users/mac/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/202.7351085/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.5.1, Build version 12E507 • CocoaPods version 1.10.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [!] Android Studio (version 2020.3) • Android Studio at /Applications/Android Studio.app/Contents • 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 ✗ Unable to find bundled Java version. • Try updating or re-installing Android Studio. [✓] Android Studio (version 4.2) • Android Studio at /Users/mac/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/202.7351085/Android Studio.app/Contents • 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.8+10-b944.6916264) [✓] IntelliJ IDEA Ultimate Edition (version 2021.1.3) • IntelliJ at /Users/mac/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app • Flutter plugin version 58.0.3 • Dart plugin version 211.7665 [✓] VS Code (version 1.58.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.24.0 [☠] Connected device (the doctor check crashed) ✗ Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know about this issue at https://github.com/flutter/flutter/issues. ✗ Exception: Unable to run "adb", check your Android SDK installation and ANDROID_SDK_ROOT environment variable: /Users/mac/Library/Android/sdk/platform-tools/adb • #0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3) #1 AndroidDevices.pollingGetDevices (package:flutter_tools/src/android/android_device_discovery.dart:78:7)