While working on an Android App, I came across an odd error when attempting to run my application. It started happening for no apparent reason, and halted my app from launching to my device:
1 2 3 4 5 6
Waiting for device. Target device: 0123456789xxabcdef Uploading file local path: .../projectname/projectname/project/build/classes/debug/AppName.apk remote path: /data/local/tmp/com.xxx.xxx.android.projectname Local path doesn't exist.
I am using gradle 6+ with android build 19.
My path was not defined in my .iml file. I needed to add the following to my configuration node:
<option name="APK_PATH" value="/build/apk/your_project_name-debug-unaligned.apk" />
I’m not sure why this wasn’t defined in the first place, but it resolved the issue for me. I also stumbled across a another solution, in case this one did not resolve your issue:
Other Possible Solution:
In your projects root directory run the following command:
./gradlew clean packageDebug