Skip to content

"No device" in status bar when Flutter is installed in C:\Program Files #2222

Closed

Description

@balajis-13395

Hi,
I had installed flutter latest SDK and I setup VS code with flutter extension as my IDE.

The problem I am facing is whenever I tried to launch the flutter app from vs code. it shows 'no device available' message.

I had executed 'flutter doctor' and 'flutter device' commands .Everything was fine.

I was able to see the connected devices in 'Android Studio' . But my VS code is not recognizing the connected .

Please help me to resolve this issue .Thanks in advance

Activity

  1. DanTup commented on Jan 15, 2020

    @DanTup
    Member

    Can you provide a screenshot of where you see this message?

    Does it show "no device" in the status bar too, or do you see your device listed there? If no device, could you enable the daemon log and post the contents here? Thanks!

  2. added
    awaiting infoRequires more information from the customer to progress
    on Jan 15, 2020
  3. balajis-13395 commented on Jan 16, 2020

    @balajis-13395
    Author

    Hi Dan,
    In my VS code status bar it is showing 'no Device'

    Please find the below logs,
    !! PLEASE REVIEW THIS LOG FOR SENSITIVE INFORMATION BEFORE SHARING !!

    Dart Code extension: 3.7.1
    Flutter extension: 3.7.1 (not activated)
    VS Code: 1.41.1
    Platform: win
    Workspace type: Flutter
    Multi-root?: false
    Dart SDK:
    Loc: C:\Program Files\flutter\bin\cache\dart-sdk
    Ver: 2.5.0-edge.1ef83b86ae637ffe7359173804cbc6d3fa25e6db
    Flutter SDK:
    Loc: C:\Program Files\flutter
    Ver: 1.9.1+hotfix.6
    HTTP_PROXY: undefined
    NO_PROXY: undefined

    Thu Jan 16 2020 [11:03:37 GMT+0530 (India Standard Time)] Log file started
    [11:03:40 am] [Analyzer] [Info] ==> {"id":"52","method":"edit.getFixes","params":{"file":"F:\flutter\sample\first_app\lib\main.dart","offset":1688},"clientRequestTime":1579152820022}
    [11:03:40 am] [Analyzer] [Info] ==> {"id":"53","method":"edit.getAssists","params":{"file":"F:\flutter\sample\first_app\lib\main.dart","length":0,"offset":1688},"clientRequestTime":1579152820023}
    [11:03:40 am] [Analyzer] [Info] ==> {"id":"54","method":"edit.getAvailableRefactorings","params":{"file":"F:\flutter\sample\first_app\lib\main.dart","length":0,"offset":1688},"clientRequestTime":1579152820023}
    [11:03:40 am] [Analyzer] [Info] <== {"id":"52","result":{"fixes":[]}}
    [11:03:40 am] [Analyzer] [Info] <== {"id":"54","result":{"kinds":["RENAME"]}}
    [11:03:40 am] [Analyzer] [Info] <== {"id":"53","result":{"assists":[]}}
    [11:03:41 am] [General] [Info] Starting debug session...
    [11:03:41 am] [General] [Info] workspace: F:\flutter\sample\first_app
    [11:03:41 am] [General] [Info] program : lib/main.dart
    [11:03:41 am] [General] [Info] Converted program to absolute path: F:\flutter\sample\first_app\lib\main.dart
    [11:03:41 am] [General] [Info] Using workspace as cwd: F:\flutter\sample\first_app
    [11:03:41 am] [General] [Info] Detected launch project as Flutter
    [11:03:41 am] [General] [Info] Using Flutter debug adapter for this session
    [11:03:41 am] [FlutterDaemon] [Info] ==> [{"id":"3","method":"emulator.getEmulators"}]
    [11:04:04 am] [General] [Warn] Unable to launch due to no active device
    Thu Jan 16 2020 [11:04:06 GMT+0530 (India Standard Time)] Log file ended

    Please find the below for my vs code screenshot
    https://user-images.githubusercontent.com/28182172/72492264-9199e380-3842-11ea-8419-a45d7305a989.png

  4. DanTup commented on Jan 16, 2020

    @DanTup
    Member

    @balajis-13395 unfortunately that's not the correct type of log - the link (https://dartcode.org/docs/logging/#flutter-daemon) should jump to the "Flutter Daemon Logging" section which involves setting a VS Code setting to write the log to a file. Could you capture that?

    Also, can you confirm that you see the device both if you run flutter devices from a terminal outside of VS Code, and also in the built-in terminal? Thanks!

  5. balajis-13395 commented on Jan 16, 2020

    @balajis-13395
    Author

    Please find the below log and screenshot .

    I had one observartion the log file shows "Flutter extension: 3.7.1 (not activated)"

    image

    !! PLEASE REVIEW THIS LOG FOR SENSITIVE INFORMATION BEFORE SHARING !!

    Dart Code extension: 3.7.1
    Flutter extension: 3.7.1 (not activated)
    VS Code: 1.41.1
    Platform: win
    Workspace type: Flutter
    Multi-root?: false
    Dart SDK:
    Loc: C:\Program Files\flutter\bin\cache\dart-sdk
    Ver: 2.5.0-edge.1ef83b86ae637ffe7359173804cbc6d3fa25e6db
    Flutter SDK:
    Loc: C:\Program Files\flutter
    Ver: 1.9.1+hotfix.6
    HTTP_PROXY: undefined
    NO_PROXY: undefined

    Thu Jan 16 2020 [22:25:15 GMT+0530 (India Standard Time)] Log file started
    [10:25:15 pm] [FlutterDaemon] [Info] Spawning C:\Program Files\flutter\bin\flutter.bat with args ["daemon"]
    [10:25:15 pm] [FlutterDaemon] [Info] .. in C:\Program Files\flutter
    [10:25:15 pm] [FlutterDaemon] [Info] PID: 11712
    [10:25:15 pm] [FlutterDaemon] [Info] ==> [{"id":"1","method":"emulator.getEmulators"}]
    [10:26:09 pm] [FlutterDaemon] [Info] ==> [{"id":"2","method":"emulator.getEmulators"}]
    [10:26:42 pm] [General] [Warn] Unable to launch due to no active device

  6. DanTup commented on Jan 16, 2020

    @DanTup
    Member

    @balajis-13395 the daemon has not started up properly. It might not be related, but you should not put Flutter in your Program Files folder. That folder is protected by Windows and causes issues when Flutter needs to download/upgrade components.

    See https://flutter.dev/docs/get-started/install/windows#get-the-flutter-sdk

    do not install Flutter in a directory like C:\Program Files\ that requires elevated privileges

    Please try moving the SDK somewhere else and see if that solves the problem (it's possible that if your terminal is elevated but VS Code is not, you would see this work from the terminal but not from VS Code).

    If it still occurs, please try running flutter devices from the built-in VS Code terminal and post the output (along with the output of flutter doctor -v) here. Thanks!

  7. balajis-13395 commented on Jan 16, 2020

    @balajis-13395
    Author

    Hi Dan,
    thanks for your response.

    Previously I placed my flutter sdk inside Program Files . Now moved it outside program files and Everything is working fine.

  8. DanTup commented on Jan 16, 2020

    @DanTup
    Member

    Great, glad to hear!

  9. changed the title [-]vs code no device[/-] [+]"No device" in status bar when Flutter is installed in C:\Program Files[/+] on Jan 16, 2020
  10. added and removed
    awaiting infoRequires more information from the customer to progress
    on Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions