Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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:
    37
    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:
    37
    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:
    37
    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.