Skip to content

Unable to enable new device/platforms from the Flutter sidebar #5661

Closed
flutter/devtools
#9428

Description

@stan-at-work

Sometimes you only want to update the Android folder to a new version. In that case, you delete the old one and execute:

flutter create --platforms android .

This recreates the Android folder with the latest bits and pieces.
It would be a good addition to the visual panel or accessible via Ctrl + P.

This should be expanded to create Windows/iOS/Linux/Web folders as well, with their corresponding events.

Image

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Aug 21, 2025
  2. DanTup commented on Sep 8, 2025

    @DanTup
    Member
  3. added
    in flutter sidebarRelates to something in the "Flutter sidebar" that's provided via DevTools
    and removed
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Sep 8, 2025
  4. changed the title [-]Add the ability to visually, or via Ctrl + P, create an Android/iOS/Windows/Linux folder[/-] [+]Unable to enable new device/platforms from the Flutter sidebar[/+] on Sep 8, 2025
  5. added this to the v3.120.0 milestone on Sep 8, 2025
  6. DanTup commented on Sep 8, 2025

    @DanTup
    Member

    The devices to appear to be returned when DevTools calls getDevices over DTD:

    <== {
    	"jsonrpc": "2.0",
    	"method": "Editor.getDevices",
    	"id": 0
    }
    ==> {
    	"id": 0,
    	"jsonrpc": "2.0",
    	"result": {
    		"devices": [
    			{
    				"category": "web",
    				"emulator": false,
    				"ephemeral": false,
    				"id": "chrome",
    				"name": "Chrome",
    				"platform": "web-javascript",
    				"platformType": "web",
    				"rawDeviceName": "Chrome",
    				"supported": false
    			},
    			{
    				"category": "web",
    				"emulator": false,
    				"ephemeral": false,
    				"id": "edge",
    				"name": "Edge",
    				"platform": "web-javascript",
    				"platformType": "web",
    				"rawDeviceName": "Edge",
    				"supported": false
    			},
    			{
    				"category": "web",
    				"emulator": false,
    				"ephemeral": false,
    				"id": "web-server",
    				"name": "Web Server",
    				"platform": "web-javascript",
    				"platformType": "web",
    				"rawDeviceName": "Web Server",
    				"supported": false
    			},
    			{
    				"category": "desktop",
    				"emulator": false,
    				"ephemeral": false,
    				"id": "windows",
    				"name": "Windows",
    				"platform": "windows-x64",
    				"platformType": "windows",
    				"rawDeviceName": "Windows",
    				"supported": false
    			}
    		],
    		"type": "GetDevicesResult"
    	}
    }
    

    So perhaps the issue is in the DevTools sidebar code. Oddly, if I enable Web from VS Code, then this happens:

    Image

    Windows has appeared, but Android is still missing. Reviewing the above, Android is also missing - so perhaps there are bugs on both sides.

  7. DanTup commented on Sep 8, 2025

    @DanTup
    Member

    Ok, the reason Android doesn't show here is that there is no Android device selected. We only send actual devices, and a flag for whether they're enabled or not. This seems reasonable, the Android platform would show up to enable if an Android device was selected.

    The reason that nothing shows up at first was because there's a logic error in DevTools that tried to only show the device list if there are some devices, but the not-enabled platforms was part of the same table. Working on a fix.

  8. DanTup commented on Sep 8, 2025

    @DanTup
    Member
  9. added
    relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
    on Sep 8, 2025
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

    in flutter sidebarRelates to something in the "Flutter sidebar" that's provided via DevToolsis bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions