Flutter Doctor - Cannot determine if IntelliJ is installed - flutter

Flutter Doctor - Cannot determine if IntelliJ is installed
I have tried installing flutter 2.2 on my Mac OSX but flutter doctor was throwing a error for IntelliJ. I have already installed IntelliJ IDEA CE on my MAC OSX.
I have followed the below documentation but there was no log which confirms the folder in which it is searching for IntelliJ.
Reference Manual
(base) Thomass-MacBook-Pro:JLPT thomasvimaleasok$ flutter doctor -v
[✓] Flutter (Channel stable, 2.2.0, on macOS 11.1 20C69 darwin-x64, locale
en-IN)
• Flutter version 2.2.0 at
/Users/thomasvimaleasok/Projects/flutterapps/flutter
• Framework revision b22742018b (4 days ago), 2021-05-14 19:12:57 -0700
• Engine revision a9d88a4d18
• Dart version 2.13.0
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/thomasvimaleasok/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.0)
• 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
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
[✗] Cannot determine if IntelliJ is installed
✗ Directory listing failed
[✓] VS Code (version 1.54.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (1 available)
• Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.212
! Doctor found issues in 1 category.

I fought with this error for a while, but finally found a solution for my case.
There was a folder in my Applications folder (unrelated to IntelliJ) that wasn't readable. A sudo chmod a+rx on that location resolved the problem.
flutter doctor -vv turned up the error, but the problem appeared at the beginning of the execution log, and not anywhere near the Cannot determine if IntelliJ is installed error.

Related

Flutter: Exception: Android toolchain - develop for Android devices exceeded maximum allowed duration of 0:10:00.000000

flutter doctor gives the following error:
Checking Android licenses is taking an unexpectedly long time...[☠] Android toolchain - develop for Android devices (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: Android toolchain - develop for Android devices exceeded maximum allowed duration of 0:10:00.000000
I have installed the latest Android SDK Command-line Tools in Android Studio
I have tried setting the location of SDK via flutter config --android-sdk /Users/mooreihu/Library/Android/sdk
I have tried running flutter doctor --android-licenses, and it hangs indefinitely. I never reached a timeout or anything like that.
I am not sure what else to try, haven't found much on this specific issue online. Thank you for any help!
Here is my complete flutter doctor -v output:
[✓] Flutter (Channel stable, 3.3.1, on macOS 12.5.1 21G83 darwin-arm, locale en-US)
• Flutter version 3.3.1 on channel stable at /Users/mooreihu/Downloads/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4f9d92fbbd (8 days ago), 2022-09-06 17:54:53 -0700
• Engine revision 3efdf03e73
• Dart version 2.18.0
• DevTools version 2.15.0
Checking Android licenses is taking an unexpectedly long time...[☠] Android toolchain - develop for Android devices (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: Android toolchain - develop for Android devices exceeded maximum allowed duration of
0:10:00.000000
•
[✓] Xcode - develop for iOS and macOS (Xcode 14.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14A309
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.2)
• 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
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
[✓] IntelliJ IDEA Ultimate Edition (version 2022.1.3)
• IntelliJ at /Applications/IntelliJ IDEA.app
• 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
[✓] IntelliJ IDEA Community Edition (version 2022.1.3)
• IntelliJ at /Users/mooreihu/Library/Application
Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5921.22/IntelliJ IDEA CE.app
• 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
[✓] VS Code (version 1.69.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.5.1 21G83 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 105.0.5195.102
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
The solution to this was to used Java 8 instead of Java 11
You have to install Java 8 instead of your actual version of Java and reboot the computer!!

Flutter CLI not able to install

When trying to install the CLI I get this message:
The current Dart SDK version is 2.10.5.
Because pub global activate depends on flutterfire_cli any which requires SDK version >=2.12.0 <3.0.0, version solving failed.
this is what I get when running flutter doctor -v:
Running "flutter pub get" in flutter_tools... 4,2s
[✓] Flutter (Channel master, 3.4.0-19.0.pre.86, on macOS 12.5.1 21G83 darwin-x64, locale de-DE)
• Flutter version 3.4.0-19.0.pre.86 on channel master at /Users/rimaasri/Development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision a04e6b7618 (2 hours ago), 2022-09-06 02:08:10 -0400
• Engine revision 623b80157c
• Dart version 2.19.0 (build 2.19.0-171.0.dev)
• DevTools version 2.17.0
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/rimaasri/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 13F100
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.1)
• 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
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
[✓] VS Code (version 1.71.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.48.0
I can't find the problem because I thing I have the newest version of dart....
I could resolve it with:
flutter channel master
flutter upgrade --force
then cleaning the workspace again with:
flutter clean
flutter pub get

Visual Studio Code Run Options Are Not Responding For Flutter (Like Run --> Start Debugging)

As the title mention, Visual Studio Code is not responding when I follow,
Run --> Start Debugging
Run --> Run Without Debugging
After trying those ways, the IDE is not giving any reaction. No error log appears on Terminal or Debug Console
The good thing is that "flutter run" is working robustly
What have I tried for a solution?
Checked similar questions on SO
Run "flutter doctor" to check any issue (the log is below)
Checked Dart and Flutter plugins are installed on Visual Studio Code
Restarted Visual Studio Code, also PC
flutter doctor full log
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.4 21F79 darwin-x64, locale en-TR)
• Flutter version 3.0.5 at /Users/hede/flutter/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f1875d570e (5 weeks ago), 2022-07-13 11:24:16 -0700
• Engine revision e85ea0e79c
• Dart version 2.17.6
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/hede/Library/Android/sdk
• Platform android-32, build-tools 31.0.0
• ANDROID_HOME = /Users/hede/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] 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
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
[✓] IntelliJ IDEA Community Edition (version 2022.1.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• 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
[✓] VS Code (version 1.70.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.46.0
[✓] VS Code (version 1.66.2)
• VS Code at /Users/hede/Downloads/Visual Studio Code.app/Contents
• Flutter extension version 3.46.0
[✓] VS Code (version 1.66.2)
• VS Code at /Users/hede/Downloads/Visual Studio Code 2.app/Contents
• Flutter extension version 3.46.0
[✓] Connected device (2 available)
• Mustafa’s IPhone (mobile) • 00008101-XXXXXXXXXX • ios • iOS 15.5 19F77
• macOS (desktop) • macos • darwin-x64 • macOS 12.4 21F79 darwin-x64
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!

Flutter build error : Lost connection to device

I cannot build with the following error message both iOS and Android.
Lost connection to device.
Exited (sigterm)
I try flutter doctor -v
-> % flutter doctor -v
[✓] Flutter (Channel stable, 2.10.3, on macOS 12.2.1 21D62 darwin-arm, locale ja-JP)
• Flutter version 2.10.3 at /Users/hoge/develop/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 7e9793dee1 (5 days ago), 2022-03-02 11:23:12 -0600
• Engine revision bd539267b4
• Dart version 2.16.1
• DevTools version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/hoge/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Users/hoge/Downloads/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.2
[✓] 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
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[✓] Android Studio (version 2020.3)
• Android Studio at /Users/hoge/Downloads/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.10+0-b96-7249189)
[✓] VS Code (version 1.65.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.36.0
[✓] Connected device (2 available)
• iPhone 11 (mobile) • F79C5603-6113-4998-AEF8-97D7BEF5C4FB • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-2 (simulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 99.0.4844.51
! Error: Xcode will continue when iPhone is connected. (code -13)
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
If anyone knows a solution, please let me know.
Finally, the following method solved the problem.
(This may have been a specific problem with my device)
Uninstalling the app on the emulator and then building it solved the problem.

Update Dart SDK from 2.10.3 to 2.12.0 in Vscode

I am getting the following error when I try to update the environment sdk in flutter.
The current Dart SDK version is 2.10.3.
Because my_app requires SDK version >=2.12.0 <3.0.0, version solving failed.
pub get failed (1; Because my_app requires SDK version >=2.12.0 <3.0.0, version solving failed.)
exit code 1
flutter doctor -v gives me the following result
[✓] Flutter (Channel beta, 2.2.0, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-IN)
• Flutter version 2.2.0 at /Users/mustafazaki/flutter
• Framework revision b22742018b (4 weeks ago), 2021-05-14 19:12:57 -0700
• Engine revision a9d88a4d18
• Dart version 2.13.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/mustafazaki/Library/Android/sdk
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.1, Build version 12A7403
• CocoaPods version 1.10.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• 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
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.56.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.23.0
[✓] Connected device (3 available)
• iPhone 12 Pro Max (mobile) • 67F57BF6-B6BC-4061-9BFD-01D38275C4E1 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-14-1 (simulator)
• Chrome (web) • chrome • web-javascript • Google Chrome
91.0.4472.77
• No issues found!
Also, why I can't see the latest dart update on vscode? It shows me only 2.10.3
flutter clean also doesn't seem to work.
You might just need to modify the target Dart environment of the Flutter app in its pubspec.yaml file. Update the environment section to:
environment:
sdk: ">=2.10.0 <3.0.0"
It was mentioned in the Dart SDK changelog back in 2021. Also, if flutter upgrade doesn't work. Try adding --force in the command.