If you have something like this in the 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 one
def getDate() { def date = new Date() def formattedDate = date.format('dd.MM.yyyy') return formattedDate }
You must remove getDate () from the output to fix your problem. Take a look at this post.
source share