Can't build for android or use unity remote

Hey,

I’m finding it impossible to build for my android device or to even use unity remote 5. Unity just does not want to connect to my devices at all. I’ve tried this with 2 phones and 1 tablet, everything leads to same results. If i’m trying to build, unity gives an error that it can’t connect the device. Also when trying to test with unity remote, nothing happens, which is devastating because I can’t continue with my projects without testing them. All the devices work fine on Android studio. I’m using Unity’s recommended JDK, SDK etc. versions. I have also enabled developer mode with usb debugging on and PTP mode.

I can’t seem to find any recent similar problems anywhere so am I missing something obvious? I’m really getting frustrated.

Thanks.

Do you have the Unity Remote app in your phone or tab?

I actually tried both but tab was borrowed only for testing purposes. I only own a phone. I’ve read all tutorials and watched youtube videos but nothing seems to help. :frowning:

With the phone connected via USB, what do you get when you run “adb devices”?

Omg. You actually nudged me in the right direction. My device was listed as unauthorized. I did some research and after trying a ton of different advices I found from google, I finally found the solution! I had to delete adbkey and revoke usb debugging and start all over and now it’s finally working! Thank you so much for help!

2 Likes

Hi Sha3dyn
Sadly, I have to ask, how did you delete the key etc? Where is it and what do you mean start over?I can run adbdevices and see it listed. I believe it is authorised because it lists it as ‘device’ not ‘unauthorised’. But that is as far as I know what to do.
Any help appreciated.

Why do you ask, are you receiving an error?

  • Disconnect USB between PC and device.
  • Stop adb server by entering “adb kill-server” in command window.
  • On device use “Revoke USB debugging authorizations” in “Developer Options”
  • On PC delete “adbkey” file in user directory, for example “C:\Users\JohnDoo.android”
  • Reconnect the device to the PC.
1 Like
  • Disconnect USB between PC and device
  • Stop adb server by entering “adb kill-server” in command window
  • On device use “Revoke USB debugging authorizations” in “Developer Options”
  • On PC delete “adbkey” file in user directory, for example “C:\Users\JohnDoo.android”
  • Reconnect the device to the PC
  • Open a command window and enter “adb devices”. Watch the device’s screen for any Authorization message and allow the connection.

The device should now show as “device”:

C:\Users\JohnDoo>adb devices
List of devices attached
17310D821D device
If the above does not help, re-installing adb and or USB drivers may help.

1 Like