简体   繁体   English

Gradle 构建未能生成 .apk 文件。 这个文件很可能是在C:\......\build下生成的,但是工具找不到

[英]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.

相关问题 Flutter:Gradle 构建未能生成 .apk 文件。 很可能这个文件是在***下生成的,但是工具找不到 - Flutter: Gradle build failed to produce an .apk file. It's likely that this file was generated under *** but the tool couldn't find it Flutter:Gradle 构建未能生成 .apk 文件。 这个文件很可能是在下面生成的<app_root> \build,但工具找不到它</app_root> - Flutter: Gradle build failed to produce an .apk file. It's likely that this file was generated under <app_root>\build, but the tool couldn't find it Flutter 调试错误“Gradle 构建未能生成 .apk 文件” - Flutter debug error "Gradle build failed to produce an .apk file" 詹金斯(Jenkins)与蚂蚁建立不会产生apk文件 - Jenkins build with ant does not produce a apk file 是否可以在gradle中创建另一个(构建APK(s))文件路径? - Is it possible to create another (Build APK(s)) file path in gradle? 在项目目录下找不到应用程序 build.gradle 文件 - Could not find the application build.gradle file under project directory 每次我点击“运行”按钮时,Gradle 中的构建自动化工具是否会替换 apk 文件? - Does the build automation tool in Gradle replace the apk file every time I hit the "run" Button? ionic build android:在Ionic 2中未生成APK文件 - ionic build android : No APK file generated in Ionic 2 Gradle构建完成了520个错误,但APK已成功生成 - Gradle build finished with 520 error(s) but APK generated successfully 构建失败生成的构建 APK 反应原生 - Build Failed Generated Build APK react native
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM