Android Question Force IDE to Select Attached Device(s)

Harris

Expert
Licensed User
Longtime User
I notice that if the project doesn't do a full build (in debug mode) - the IDE chooses the last connected device to install to (USB connected).

How do I set the IDE to always ask which device to deploy to?

Thanks
 

mcqueccu

Well-Known Member
Licensed User
Longtime User
I believe it always asks if two or more devices are connected. Unless one is disconnected, it chooses the one that is connected.

When that happens, i go to logs tab, and click on connect, and if it connects directly again, then i know only one device is connected.

To fix, goto Tools->Restart ADB Server....Wait for few seconds and click connect or run, you should be prompted to choose a device to connect to.
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
I believe it always asks if two or more devices are connected.

I have 2 devices connected by USB.
Only if it does a full rebuild... Then it asks which to install to.
If it is a simple update (log message for example) - it always installs to the last installed device... Without the dialog asking where you wish to deploy.

Thanks
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I believe it always asks if two or more devices are connected.
No.

It doesn't ask you when the previous device is available and:
1. You compile with Alt + 3 (background compilation).
2. Or when a full compilation is not needed in debug mode.

Switching devices will break the quick deployment feature. Cleaning the project (Ctrl + P) will force it to do a full compilation and it will then ask you for the target device.

If you want to disable the quick deployment feature, which I think is a mistake to do:
B4X:
#DebuggerForceFullDeployment: true
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
No.

It doesn't ask you when the previous device is available and:
1. You compile with Alt + 3 (background compilation).
2. Or when a full compilation is not needed in debug mode.

Switching devices will break the quick deployment feature. Cleaning the project (Ctrl + P) will force it to do a full compilation and it will then ask you for the target device.

If you want to disable the quick deployment feature, which I think is a mistake to do:
B4X:
#DebuggerForceFullDeployment: true
Ok, I understand why it won't... Makes perfect sense.
I will do a complete build (Clean Project) when I want to switch from tablet to phone and back.
Thanks kindly.
 
Last edited:
Upvote 0
Top