Unable to install APK to device (768495)

In the past, I have built and run many times with no issues. Suddenly today I got this error. I reset my android tablet to factory settings, and I restarted my computer. Still no luck.

What can I do to fix this?

Click on the error, and see the full message below in lower Console window

First Error:

CommandInvokationFailure: Unable to install APK to device. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.
C:\Program Files\Unity\Hub\Editor\2019.1.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\adb.exe -s "5200f46cdc555600" install -r "C:\Users\Home\Desktop\Builds\Math.apk"

Second Error:

CommandInvokationFailure: Unable to install APK to device. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.
C:\Program Files\Unity\Hub\Editor\2019.1.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\adb.exe -s "5200f46cdc555600" install -r "C:\Users\Home\Desktop\Builds\Math.apk"

Does “adb devices” return “Unauthorized” by chance?

That’s wrong window, console window is split in two windows, one with messages,the second one with context, it should be below. Click on the error, and check context window.

I copied and pasted the bottom of the console window.

I didn’t notice any warning about that. Is there a way to check it?

Run adb from the command line to check.

Also try executing manually

C:\Program Files\Unity\Hub\Editor\2019.1.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\adb.exe -s "5200f46cdc555600" install -r "C:\Users\Home\Desktop\Builds\Math.apk"

I don’t have adb on my computer.
5267508--527181--Capture.PNG
I was able to build and run yesterday by switching the USB port. I don’t know why that matters.

That means, you needed to reauthorize the device, in the end you didn’t show what was failing, so it’s only a guess

a

You need the correct path, it would not be found by default.

I solved this problem. I set the path of adb.exe into the environmental variables, and then delete the original build version in oculus quest, which has already been installed. The reason maybe the difference in oculus link versions, also remember to update your oculus link version.

I GOT IT. all I had to do was uninstall the old files that were on my phone (or wherever your building to) and then the build worked

Thanks!
This worked for me. The older files on my phone were built on a previous version of unity and somehow the new unity console wouldn’t let me build a new one on the same device. After uninstalling the old app I was able to build my app directly onto my target phone

If you use debug keystore, that will happen. If you use adb command manually, it should complain about it.

you can fixed with by setting the path of local sdk instead of unity sdk.
Go to Edit/Preferences/External Tool and then scroll down for Android and set path of sdk to local skd.
Make sure you have installed Android Studio first.
7303792--884680--upload_2021-7-7_1-55-5.png

when i try to make a apk it makes a windows sound