Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity Remote 5 & Project Settings - Unity Remote - Device: Device Won't Show

Discussion in 'Android' started by Cinqed, Jun 15, 2019.

  1. Cinqed

    Cinqed

    Joined:
    May 30, 2017
    Posts:
    20
    Hi,
    I'm new to Unity dev but have a lot of experience with mobile dev. I'm trying to use the Unity Remote 5 app for my android dev with Unity, but it seems Unity can't "see" my device, even though I develop with the same machine for Android using Xamarin. This means Visual Studio (2019) has already installed all the Android SDK bits, and Microsoft has also moved to OpenJDK.

    SO... does anyone recommend against me pointing the Unity preferences to the JDK and android tooling installed for VS? Or keep it pointing to the Unity installed bits, as recommended by the Unity Project settings preferences... but isn't working.

    I've had the experience in the past where adb (android debugger that connects android devices to debugger IDEs) only wants one "jdk home"...

    SO... Yes, this android device connects to this PC for debugging all the time but doesn't want to for Unity.

    Help?!
    Thanks,
    Dave G
     
  2. Cinqed

    Cinqed

    Joined:
    May 30, 2017
    Posts:
    20
    ANSWERED: I hope this helps someone else...

    I figured out that on a machine like mine, where a the JDK and Android SDK have already been installed by Visual Studio, the easiest solution to get Unity Remote working is to make sure that there are no ADB instances running before starting Unity. Just use task manager and kill adb.exe process if you see it.

    EXPLANATION: If you have run Visual Studio prior to opening Unity, there's a good chance it started ADB using 'its' installs of JDK and Android and that process will remain running even after VS exits. When Unity runs, I assume it sees ADB is already running - but doesn't know that's the process associated with a different Android SDK install, not the one associated with the path it anticipates.

    So... just kill any adb before starting Unity.