jessicasaini95
jessicasaini95

Reputation: 13

Android device in android studio not authorized

I enabled my phone to developer mode and turned on USB debugging etc.

When I try to run an android studio app on my phone I get the following message: device unauthorized. This adbd's $ADB_VENDOR_KEYS is not set; try 'adb kill-server' if that seems wrong. Otherwise check for a confirmation dialog on your device.

My phone is a samsung galaxy s5. Wondering how I can fix this. Some people told me I should use the original samsung cable.

Please advise.

Upvotes: 1

Views: 4419

Answers (1)

Skizo-ozᴉʞS ツ
Skizo-ozᴉʞS ツ

Reputation: 20626

Follow those steps : (FIRST OPTION)

  1. Unplug the USB from your pc

  2. Turn screen on and unblock your phone

  3. Connect it via USB to your PC

  4. See the screen of your phone it will appear a dialog with a MAC address and you'll have to accept it

If those steps didn't work just go through (SECOND OPTION)

  1. Go to platform-tools/.android and delete adbkey

  2. Go to C:Users/YOURUSERNAME/.android and delete adbkey

  3. Go to C:\Windows\System32\config\systemprofile\.android and delete adbkey

  4. Restart AndroidStudio

Upvotes: 6

Related Questions