Android Question Force IDE to Select Attached Device(s)

Discussion in 'Android Questions' started by Harris, Jun 14, 2018.

  1. Harris

    Harris Well-Known Member Licensed 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?

  2. mcqueccu

    mcqueccu Member Licensed 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.
  3. Harris

    Harris Well-Known Member Licensed User

    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.

    Last edited: Jun 14, 2018
  4. Erel

    Erel Administrator Staff Member Licensed User


    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:
    #DebuggerForceFullDeployment: true
    Harris and BillMeyer like this.
  5. Harris

    Harris Well-Known Member Licensed User

    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: Jun 15, 2018
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice