APK file {PATH TO APK} does not exist on disk.

已回答

I added some git versioning to my APK file and it works flawlessly from the command line, but when done through IntelliJ I always get the following error

 

The APK file {PATH_TO_APK} does not exist on disk.

 

The path to the APK file is correct if I build from the command line then click "Debug" inside of IntelliJ, but if I clean the wrong apk gets built.

 

0

Could you please prepare and provide a small sample project illustrating the problem and the exact steps to reproduce (complete zipped source tree and project files)?

0
Avatar
Permanently deleted user

https://github.com/aaboyd/IntelliJAndroidDebugFailure  

 

Thanks in advance for the help.

0

This seems to be Android/Gradle specific issue that also affects Android Studio. You can check http://stackoverflow.com/questions/34039834/the-apk-file-does-not-exist-on-disk for the workarounds.

The easiest solution would be to add the Gradle build step to before launch section:

0

This issue can sometimes happen when the APK file path is incorrect or the file has been moved. Checking the file location and rebuilding the project may help resolve the problem.

0

This can be frustrating when the APK builds fine from the command line but fails in IntelliJ. Checking the build configuration and making sure IntelliJ points to the correct APK output path after cleaning might help. It would be useful to know what fixed it for others facing the same issue.

0

This looks like a Gradle output-path mismatch between the command-line build and IntelliJ's Debug configuration. Try adding the Gradle build task to the Before launch section of your run configuration, then verify that the APK path matches the file produced after a clean build. Reloading the Gradle project may also help.

I’d also make sure the versioning changes aren’t altering the output filename unexpectedly. Whether you’re troubleshooting a development build or checking an app release such as the rejikibet apk latest version, the key is to verify the actual generated APK path rather than relying on a hardcoded location.

0

请先登录再写评论。