[AC-5628] No Android devices found after closing Android Studio
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Duplicate |
Resolution Date | 2018-04-09T21:15:01.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Marian Kucharcik |
Assignee | Shak Hossain |
Created | 2018-02-27T14:59:10.000+0000 |
Updated | 2018-04-09T21:15:01.000+0000 |
Description
Hi guys,
if I work in Appc Studio and also Android Studio is running, everything is fine. If I close Android Studio, Android devices disappears from Appcelerator Studio. If I run Android Studio again, there is my connected device. I tried to restart adb server, restart Appc studio, nothing helped. appc info sees that device
I have to restart computer to make it working again. Please look at it why is this happening. Thanks
Hello, Is this for a specific device or happening for multiple devices? What are the device models? Thanks.
Hi Sharif, I use Nexus 5X and One Plus One, both devices are visible after adb devices and appc info and no device is visible in Appc Studio. After restart computer and Refresh devices in Appc studio is everything back in normal.
Hi guys, I just discovered, there is no need to restart computer, I have to restart appcd via appc appcd restart, next Refresh devices in Studio and they will reappar. I think it's caused by Android Studio, when it quits, it happens to me all the time
Hello, Did the devices are visible only when the Appc studio is running? I believe also the issue is with Android studio, When you quit it, it disconnects the devices. The issue is invalid. Thanks.
Hi Sharif, when I quit Android Studio, devices remain visible for adb devices and also for appc info, not for Appcelerator Studio. Restart PC or appc appcd restart solves the problem for me.
I am asking If you only run the Appc studio after a restart and connect the devices, wear you able to run in the device?
If I quit Android Studio, it's not important if Appc studio is running or not(it it's running, devices disappear immedieately, if I run it after Android studio quits, devices will not appear). When I restart pc, run Appc studio and connect device, it appears normally(sometimes is required to refresh devices from Studio, sometimes not. Also sometimes disappear whole Run option(with all emulators) and remains only Package app option - after Refresh devices it comes to normal). I discovered, that restarting PC is not required, I can restart appcd when Appc studio is still running and Refresh devices after and everything will be fine.
As you said you can run on the device with Appc studio after a restart. So, the issue here is with Android studio, when it quits it disconnects the devices with it. And you need to restart the appcd to bring them back for Appc studio. So, the issue here is with Android studio. You can ask in the Android community about that. Thanks.
Question is, if it's Android studio bug, why if I run in terminal "adb devices" or "appc info" after Android studio quits, both command's outputs sees my device but Appcelerator Studio doesn't and I have to restart appcd. I thought, that it relates with each other(I thought that Appcelerator Studio device list is nice listing of appc info or similar "appc" command output).
[~max87] This is a known issue with the daemon currently, DAEMON-164, that is fixed in the upcoming 1.1.0 release. I won't bore you with the details, but the reason this occurs is because currently the daemon does not re-init the connection if adb exits. As you've already found restarting the daemon fixes this, you might find it slightly quicker to just restart the android plugin with
appc appcd exec /appcd/plugin/stop/appcd-plugin-android && appc appcd exec /android/latest/info/devices
Thanks Ewan for your comment, I'm looking forward for available fix. In meantime I'm happy, that restarting appcd is also enough(and it's better memorable) than restarting android plugin(pain was, when I didn't know this and had to restart my mac).