简体   繁体   中英

Android Error Installing APK

When I try to run my app in an emulator I get the error:

The APK file C:\Users\PC\AndroidStudioProjects\AppProject\app\build\outputs\apk\app-debug.apk does not exist on disk.
Error while Installing APK

I'm not entirely sure what has happened after I just recieved an update for android studio. I have tried refreshing the gradle projects, cleaning the project, rebuilding the project, building the apk file, and of course restarting android studio. I can build the apk and it shows up in my file explorer, but when I try to run it gives me this error as if android studio is not finding it. Can anyone help me or lead me in the right direction to fix the problem?

Hey its to do with the Gradle version when running the application. For some reason its not installing the debugger. Just use the version 2.1.3 instead of 2.2.0 and it will work or you can go to File -> Project Structure -> Project -> Android Plugin Version. change to 2.1.3

Reference this image if your stuck.

This error can sometimes be caused by issues in your ports. You need to follow these steps to fix this.

  1. Go to task manager and kill the service named "adb.exe".

  2. If you are using a personal computer , then try switching between your front and back ports.

  3. If you are using a laptop, then try switching between your available ports.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM