5

I recently updated my android studio and have started getting this error:

The APK file \app\build\outputs\apk\app-debug.apk does not exist on disk. Error while Installing APK

This is quite frustrating as I have tried everything I have come across online and nothing has worked.

As far as I'm aware the path to the app-debug.apk is correct and it does exist. If anyone has some insight please help!

TEMPORARY FIXES

  1. Running it in release mode does work. ~Thanks to Umer Farooq
  2. Running it with a custom build variant also works and gives a little more freedom than just release mode. ~Thanks to Prashant Shable

These fixes are nice to get your current project running, but doesn't fix the original problem. Give these a try if nothing else works for you and you are sick of seeing the error. :)

PERSONAL FIX

I'd love to say it was complicated, but it really wasn't. I had a ' (special character) in my Users folder name. Apparently this was causing the problem. This was pointed out in the comments of the Answer by Umer Farooq.

Final Remarks

I wanted to say thanks to everyone for the help. I think all these answers will make a nice reference for future AS users with this problem.

Community
  • 1
  • 1
WDude
  • 67
  • 9

3 Answers3

1

Build it in a release mode to get your apk file ...

Hobbit
  • 601
  • 1
  • 9
  • 22
  • While this does work to run it in release mode, it does not help me with debug. I did try making a new debug key and point to it in the project structure but it still has the same issue. – WDude Nov 24 '16 at 06:07
  • delete a build folder in your app manually and then clean the project and rebuild it ... Hopefully it works.. – Hobbit Nov 24 '16 at 07:31
  • Have you checked your path for apk file ?? It must not contain any special character – Hobbit Nov 24 '16 at 08:22
  • Apparently a windows 10 update had altered my user folder and added 's-PC to the end. I hate to say this was the problem, but I think you're right. Once I got rid of it and changed the various android paths it seemed to work. Thanks! – WDude Nov 24 '16 at 08:59
  • Please [edit] the clarification comments to the answer. – Bhargav Rao Nov 26 '16 at 08:38
0

Manually Delete apk folder from the Project Directory then clean and rebuild project in android studio

Project folder ---> build---->outputs--->apk (delete the folder)

Clean and rebuild in AndroidStudio

sasikumar
  • 12,540
  • 3
  • 28
  • 48
0

Click the button marked in red color.

enter image description here

refer this

Community
  • 1
  • 1
SUTHANSEE
  • 332
  • 4
  • 13