flutter doctor: device is offline - flutter

After running Flutter doctor to see why my physical LG G6 device was not being picked up, I found out that the "Device is offline".
I've tried googling around, and unplugging and re plugging the device.
Nothing seems to work.
What does this mean? My device does have debug enable, and it's definitely connecting to the pc and flutter definitely see it.

It could be a problem with the USB cable.
Had the same problem, then tried another cable, plugged in the same port as the old cable, and it didn't go offline.
If I plug in the old cable, the same problem happens: it goes offline after some time, even though it's connected, and I can see my device's files in Windows.

Related

Debug Flutter app on Android device while simultaneously showing its screen on desktop with scrcpy

Working in Ubuntu, I'm debugging a Flutter app on my Android phone while I code it. So far that works fine, but I would like to see the phone screen on my pc for comfort. I know an emulator would do the trick, but for performance issues I used my phone instead.
So far I installed scrcpy, and managed to show the phone screen on the pc via WiFi debugging. The problem comes when I try to run both connections at the same time. If I have the WiFi scrcpy connection on, it disconects right when VS Code connects with the device via USB. And viceversa, if the USB debugging is on, attempting to start scrcpy kills the Flutter debug.

Internet is not connected in Android Emulator, when net is taken via mobile through hot spot

I am working in a native-script application, so I use Android Emulator for checking, I have mentioned below the version of Emulator.
The Internet is not connected in my emulator even signal of the WIFI also shows cross mark whenever I connect the internet connection from my mobile (Android Lenovo P2) through hot-spot.
The emphasized textInternet does connect in my Emulator whenever I connect internet via my ACT connection wifi through the router.
Emulator APK version: 26.
Emulator device: Nexus 5.
Note: My laptop connects the internet only problem in Emulator
Does anybody help me To do any setting has to be done in my Emulator to connect the internet when I connect through my mobile hot-spot?
This clearly indicates Android emulator doesn't recognize youe mobile network connected with your machine network configuration. I would recommend to try following actions to resolve this issue.
Open the AVD Manager and wipe the data of that emulator.
If you were working with wifi network and instantly switch with your mobile data may cause this problem. just try to restart the emulator and try.
Your Emulator may be pointed with older version of SDK, so you may want to uninstall Android Emulator and re-install it. Sometimes older SDK data causes the issue that you have encountered.
Reboot your machine then connect freshly with your mobile data started with emulator and check it out.
If above nothing works just uninstall AVD and re-install.
Look out this Reference link as well.
Please let me know the above solutions works for you! Cheers!!!
I have fixed the issue by adding this line in Androidmanifest.xml
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Pushing new content to emulator

English is not my mother language
I have a problem with Unity.
I connect my Nexus 5 to computer and try to build and run my app to my phone (USB debugging in enabled). But it saying "Pushing new content to device emulator 5554". When I disconnect and reconnect phone or clicked "end task" adb.exe in Task Manager it works
How to avoid this problem? Can I delete emulator?
Thanks.
I have had the same problem.
The solution, at least in my case, was very easy.
disconnect your device fron the PC or laptop
in your device, change from MTP to PTP protocols
connect again your device to your PC or laptop
try again the 'build and run', the problem should disappear.
I hope this can be useful for others.

Restart USB plugged device without restarting a computer

I am dealing with an issue that USB GSM modem throws an exception and is in the failed state until you SHUT DOWN and turn on the PC again.
The "restart" does not help, because it only flushes the memory (running on Windows XP, SP3 Pro.)
As I suspect, the problem might be solved when the USB's power goes off and on again.
But is there a way how to do it without shuting the whole PC down (Like remove and add the device in device manager)?
Also do you know how can I simulate this state? It happends randomely and I am unable to do it at my will.
Thanks
You say it is a USB device (i.e. not integrated). The only reliable way to re-power the device, apart from re-booting the PC, is to unplug and re-plug the device (which is quicker anyway).
There's a discussion here: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/326d26e7-baa9-45b4-8234-321c9e5f8ffa/
The exception is happening in the device, and without knowing what causes it, you can't reliably reproduce it. Maybe the device vendor has some software that would help you collect its logs.

How do I use Xperia Ray through Eclipse for Android programming?

I downloaded the Suite for the phone, the Google USB drivers and the Phone's connection drivers. So far, the phone works perfectly with the PC but Eclipse still refuses to see the phone and Device Manager is convincing me that I have no hardware compatible with the Google USB drivers. Therefore the Google USB drivers are downloaded but not installed or assigned to any device. I followed every answer on stackoverflow that there is so far, but none have solved the problem.
First, set your device into USB / debug mode.
Second, after you connect your device to the USB make sure your drivers is installed properly.
And last verify that adb.exe can detect you device from cmd (if running in windows) ..(path to your SDK)\platform-tools\adb device
If last step fails, then re-install you device driver, it should be handled automatically by sony pc-companion for your xperia phone.
You also have to enable USB-Debugging in Settings->Developer Options on your phone.