Differentiate between ADB Device connected over USB and Wi-Fi - flutter

I have started flutter development. I am using VSCode for this. When I want to run my app, I have to select the device I want to test it on by clicking the option on the status bar at the left.
In there, I get 2 options, one for my phone with ADB over USB, and other for my phone(same as before) with ADB over Wifi.
I cannot determine which is which because both have the same name.
Is there a way for me to change the name of one of them?

Try restarting your Visual Studio code and reconnect your device. There shouldn't be duplicate names.

Try using Android Studio, you will see two different names of the same devices.
Update:
the other solution is built the app by using the command line
flutter run
then you will see two options, one is SM G885F(xxx) which is connected by USB,
the other one is SM G885F(192.168.x.xxx) which is connected with Wifi
You will also see this line if you upgrade the latest flutter version
Please choose one: [0|1]:
Just type 0 or 1 then enter you can build a debug version.
Build release by entering
flutter run --release

Related

Android Studio device list stuck on loading

Picture of the issue
I'm trying to add my physical phone to the device list, however, the device list is stuck on loading.
I try to Kill adb process (on Task Manager on Windows) and Open Android Studio
And also I Try to reinstall Flutter and resetting the Flutter SDK, but still the same problem.
For me this fixed the issue:
First close the android studio and kill the all the related bg
processes.
Restart pc and check there are no bg processes running.
Now connect your Android Device (make sure USB debug is enabled).
Revoke the debug permissions and then allow debugging.
Now on pc run adb devices command from terminal.
If your device is displayed then proceed to open Android Studio and
wait for some time.
Also make sure that there is only one version of adb is installed.

Configuration is missing in lunch .jason running app on real device using usb debugging

developer option is On- in my phone the same as USB debugging...
the phone is connected and known in vs code
when I choose my phone to run the app. I got this error:
how to Fix it?
at the left sidebar of vs code you can create new configuration file, run and debug section

How can I open emulator or connect LD Player for flutter in VS Code?

I want to develop flutter apps but I don't have enough RAM in my laptop (just 4 gigs). So, after lots of extensive research on the internet, I installed and setup flutter sdk, android sdk and VS Code. But when I try to run a sample app, I can't see list of any available emulators on my VS Code bottom-left screen.
VS Code screenshot (see bottom left).
I am not getting any kind of errors when I run flutter doctor command.
Flutter doctor outputs in powershell.
There's a folder in Drive C where I've installed the Android SDK named as "emulator". There's an executable file named emulator.exe as well but opening it does nothing.
Emulator Folder screenshot.
I also have an external emulator LD Player installed on my laptop but I am not able to connect it with the code editor i.e., VS Code.
Please refer to the links to see the images as I don't have privileges to upload images. I'm a newbie here and this is my first question. Thanks in advance!
You will need to activate ADB settings in your LD Player Emulator.
First, go to settings
Then, select other settings
After that, make sure that you have activated the ADB connection by selecting Open Connection

How do I remove devices for running Flutter?

I tried creating a new flutter project in Visual Studio Code, but for whatever reason it now has a default device of Google Chrome every time I try to run it. I don't want to run Flutter in web environments whatsoever: is there any way I can disable this?
Run the following command to disable web completely.
flutter config --no-enable-web
Then restart your editor if necessary.
First, run your emulator from the AVD manager or connect your physical device while it's on debugging mode, if it's an android device, then choose the device you want to run from the flutter device selection option

how to run flutter app in VSCode without android studio emulator

I want to run flutter app in VS.Code without android studio emulator.
I want run my app without install android studio.
How can I do this?
If you have Gradle properly installed globally (https://gradle.org/install/) and the Android SDK setup on your machine, then you should not need the IDE.
Try first checking for available devices:
flutter devices
Then using the device that you find (if there are any spaces in the name that represents the device then use "" to format the command), execute the following command:
flutter run -d "Device Name With Spaces" --release
Or:
flutter run -d DeviceNameWithoutSpaces --release
The first option is You can run your application on chrome or edge if you don't want to download an emulator. Follow the following steps:
Click on the no-device option to select the device.
Now select chrome or edge
And the second option is you can connect your mobile with your PC and use your phone to run the flutter apps. Follow the following steps:
For Android:
Enable developer options and USB Debugging on your device. This varies slightly
by android version. But the short version is you tap on the device build number
7 times.
Then a “Developer Options” option comes up. After that, you can click “enable
USB Debugging.”
Then plug your phone into your computer with a USB cable. You’ll see some popup
on your phone asking if you want to allow USB debugging with that computer.
Click on “yes”.
Run Flutter just like you would if you had a simulator running.