when I update my android studio to 3.0 beta7 ,Build failed with an exception.
- What went wrong: Execution failed for task ':app:packageDebug'. Cannot create directory F:\project\ my project path \app\build\outputs\apk\debug
And I clear the cache,restart the computer and android studio,but it does not work at all,what should I do right now?
I kill process Java(TM) Platform SE binary ,and delete build cache ,it does not work either
I got solution from here Migrate to Android Plugin for Gradle 3.0.0
android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "${variant.name}-${variant.versionName}.apk"
}
}
This worked for me!
1. Open app.graddle file, and replace in applicationVariants.all... with
android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "${variant.name}-${variant.versionName}.apk"
}
}
2. Build-> Make project
3. Then Generate your signed APK
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