Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Can't Build and run

Discussion in 'Android' started by Rachan, Mar 6, 2024.

  1. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    792
    Hi there!

    I using Redmi Note 10 Pro with Android 13 with Unity 2022.3.14f1,(my project still need) and I plug that Android device to USB and I also enable developer mode on the device already,

    But, when I switched platform to Android and press Build and Run...
    Unity freezed a bit and can't run on that actual device,



    and it said about
    invalid build target or something,
    I don't know why...?

    I even create a blank project for this test

    What is the issue of this case?
    Thanks!!!
     
    Last edited: Mar 6, 2024
  2. Adrian_Sotomayor

    Adrian_Sotomayor

    Unity Technologies

    Joined:
    Dec 20, 2021
    Posts:
    7
    Hello, Please provide the Editor.log to see what the full errors are.

    Can you check to make sure the Android device you're trying to install to is shown in the Build Settings:
    upload_2024-3-6_13-50-44.png

    If your device is not showing up there, open a cmd line and check to see what devices are listed using "adb devices".

    If the device is showing correctly as a target, then it could be a compatibly error with the device you're using. The full Editor.log may have more information on why the install is failing. Additionally, you could try only creating an APK with Unity, and then try installing the APK via "adb install <path to apk>" and see if that shows you the same error.

    Finally, did you install the Android SDK on your own, or did you let Unity handle that? If you could check the project Preferences > External Tools to see which paths it's using:
    upload_2024-3-6_13-58-20.png
     

    Attached Files: