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.

Bug Debug Android in Visual Studio 2022

Discussion in 'Editor & General Support' started by mrwellmann, Sep 6, 2022.

  1. mrwellmann

    mrwellmann

    Joined:
    Nov 27, 2015
    Posts:
    22
    When trying to debug I can't find my Android device in VS 2022.


    It works under VS 2019.


    Tools for Unity is installed.
    VS 2022 is set as external Script Editor in Unity.
    I regenerated the Project files.
     

    Attached Files:

  2. mrwellmann

    mrwellmann

    Joined:
    Nov 27, 2015
    Posts:
    22
    Ok found the issue shortly after posting this by comparing VS Settings of Tools for Unity.
    Some time in the past I set the "Preferred Android SDK" in VS 2019
    Doing the same in VS 2022 fixed it.


    Still very annoying as I will have to remember to update this.
     

    Attached Files:

  3. mrwellmann

    mrwellmann

    Joined:
    Nov 27, 2015
    Posts:
    22
    There is another solution:
    I've talked with a college and he does not have the problem because he has Android Studio Installed and the android environment variables are set at his machine.
     

    Attached Files:

    dtaddis likes this.