[英]Gradle build failed to produce an .apk file. It's likely that this file was generated under C:\......\build, but the tool couldn't find it
I'm tring to build my flutter app on android in CMD and got message (in the subject) but app works properly.我正在尝试在 CMD 的 android 上构建我的 flutter 应用程序并收到消息(在主题中),但应用程序工作正常。 The build proccess was OK and the problem started afer I changed one of the dependencies.构建过程没问题,并且在我更改了其中一个依赖项后问题就开始了。
I have 2 flavors.我有2种口味。 The android studio build create app without errors. android 工作室构建创建应用程序没有错误。
Any idea?任何想法?
It's possible that the command is unable to find the build path to generate the APK.该命令可能无法找到生成 APK 的构建路径。 You can run these commands in the Terminal built into Android Studio.您可以在 Android Studio 内置的终端中运行这些命令。
For building APK for prod用于为产品构建 APK
flutter build apk --flavor prod -t lib/main_prod.dart
For building APK for dev用于为开发人员构建 APK
flutter build apk --flavor dev -t lib/main_dev.dart
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.