Whenever I debug application, error appears that ... .apk file does not exist on a disk
and app doesn't launch.
After updating Android Studio, this error started happening.
I tried different solutions after a lot of searching. This includes:
Any help will be appreciated.
If you have something like this in your build.gradle file:
applicationVariants.all { variant ->
variant.outputs.each { output ->
output.outputFile = new File(output.outputFile.parent, baseFilename + defaultConfig.versionCode + "_" + defaultConfig.versionName + "_" + getDate() + ".apk")
}
}
And this
def getDate() {
def date = new Date()
def formattedDate = date.format('dd.MM.yyyy')
return formattedDate
}
You should remove getDate() from output to fix your problem. Take a look at this post also.
Check your path to your apk. Might there be some special characters in folder names. This also cause the adb to through this error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With