Waq*_*ari 5 android apk android-studio
每当我调试应用程序时,都会出现错误,... .apk file does not exist on a disk并且应用程序无法启动.
更新Android Studio后,此错误开始发生.
经过大量的搜索,我尝试了不同的解决方案.这包括:
任何帮助将不胜感激.
小智 6
如果你在build.gradle文件中有这样的东西:
applicationVariants.all { variant ->
variant.outputs.each { output ->
output.outputFile = new File(output.outputFile.parent, baseFilename + defaultConfig.versionCode + "_" + defaultConfig.versionName + "_" + getDate() + ".apk")
}
}
Run Code Online (Sandbox Code Playgroud)
还有这个
def getDate() {
def date = new Date()
def formattedDate = date.format('dd.MM.yyyy')
return formattedDate
}
Run Code Online (Sandbox Code Playgroud)
您应该从输出中删除getDate()以修复您的问题.看看这篇文章也是如此.
| 归档时间: |
|
| 查看次数: |
4636 次 |
| 最近记录: |