Android Studio 中的 Flutter:Build Bundle/APK 变灰

编程入门 行业动态 更新时间:2024-10-28 00:15:41
本文介绍了Android Studio 中的 Flutter:Build Bundle/APK 变灰的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我通过这里的链接安装了 Flutter 和 Android Studio:

I installed Flutter and Android Studio following this link here: https://flutter.dev/docs/get-started/editor

I've been coding in flutter for two months now and can run my app in simulator or on a connected device no problem.

But when I try to actually build an apk via "Build" --> "Build Bundle(s) / APK", this option is greyed out.

Android Studio: 3.3.2

解决方案

You can't build apk using Build option in Android Studio if you are running your Flutter project.

There are 2 solutions to build it.

In terminal, write flutter build apk (this will build apk for release version not the debug version)

Open your module in Android Studio and you can use Build option of the Android studio to build the debug apk.

For option 2, you can go to build.gradle file and you should see an option in Android Studio asking you to open the module separately (see the screenshot) Tap on this option and you can then build your apk in both debug and release mode.

这篇关于Android Studio 中的 Flutter:Build Bundle/APK 变灰的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-14 23:21:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/851788.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Flutter   Studio   Android   APK   Bundle

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!