Flutter Run安卓真机报错:Gradle build failed to produce an .apk file. It's likely that this file was gen...

发生原因:编译完成后,找不到相应的渠道包下面生成的apk,需要配置对应的渠道的apk。
解决办法:Edit Configurations - Build flavor - Edit

Flutter Run安卓真机报错:Gradle build failed to produce an .apk file. It's likely that this file was gen..._第1张图片
图片.png

可能除了main.dart还有很多target,所以挨个选中,编辑 Build flavor

Flutter Run安卓真机报错:Gradle build failed to produce an .apk file. It's likely that this file was gen..._第2张图片
图片.png

你可能感兴趣的:(Flutter Run安卓真机报错:Gradle build failed to produce an .apk file. It's likely that this file was gen...)