1
votes

Hopefully someone can help. Have an APP that I have been working on for awhile. Compiled it earlier, no issues, and ran a debug on an attached device.

When I came back to AndroidStudio today, was prompted for an UPDATE to studio as well as a Gradle update. Ran both updates as listed... no errors during the update.

Restarted AndroidStudio and "Run APP" once again. Went through the Gradle Build as normal... then received an error when installing to the attached device....

Session 'app': Error Installing APK

Checking the RUN, I am getting:

The APK file C:\Users\Pete&apos;s PC\AndroidStudioProjects\<myapp>\app\build\outputs\apk\app-debug.apk does not exist on disk.

Error while Installing APK

That file exists with the current build date/time.

Doing some searching, people mention CLEAN / REBUILDS in various steps, tried them all. Tried exiting AndroidStudio too. Went to the device's Developer Options and Revoked USB Debugging Authorizations... then reapproved them when prompted. Also tried SYNC.

Nothing works.

It's even more frustrating because I didn't change one line of code, one setting, or anything. It was a prompted AndroidStudio/Gradle update. Uggghhh!!!

Any other suggestions... I am dead in my tracks right now.

2

2 Answers

3
votes

I do get the same problem as yours but I solved it by transferring the project file to a thumb drive. Any drive but not C drive. It can install the apk in my phone. Hope it works.

1
votes

It looks like it might be an actual bug in AndroidStudio. My "path" to where the project is stored is based off the "computer name" that was created when my copy of Windows 10 was originally setup... "Pete's PC".

So the path is....

C:\USERS\PETE'S PC\AndroidStudioProjects\myproj

It looks like the apostrophe (') in the path is throwing it off. If I move the project to ANY where where there isn't an apostrophe in the path, it compiles/installs fine... as is.

Thanks to Syaf for sort of pointing me into this direction with his "move the project to a flash drive"... that's what got me thinking and trying things.

Sadly, this is possibly a problem for alot of people because even during the Windows 10 setup, you are prompted to name the computer you can remember.... like John's PC.

I forwarded my findings to Google for review.

Peter