gpt4 book ai didi

android-studio - Flutter 未检测到 Android Studio

转载 作者:行者123 更新时间:2023-12-03 14:34:36 24 4
gpt4 key购买 nike

我已经在我的 Ubuntu 机器上正确安装了 flutter。我还安装了 Android Studio 及其插件 Flutter 和 Dart。
无论如何,当我运行时:

flutter doctor --verbose
我得到这个输出:
[✓] Flutter (Channel stable, 1.20.1, on Linux, locale es_ES.UTF-8)
• Flutter version 1.20.1 at /root/snap/flutter/common/flutter
• Framework revision 2ae34518b8 (hace 5 días), 2020-08-05 19:53:19 -0700
• Engine revision c8e3b94853
• Dart version 2.9.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
• Android SDK at /home/AAAA/Android/Sdk
• Platform android-30, build-tools 30.0.1
• Java binary at: /usr/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_265-8u265-b01-0ubuntu2~18.04-b01)
• All Android licenses accepted.

[!] Android Studio (not installed)
• Android Studio not found; download from
https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/linux#android-setup
for detailed instructions).

[!] Connected device
! No devices available

! Doctor found issues in 2 categories.
我的 android 工作室位于/snap/android-studio/current/android-studio
我也试过运行:
flutter config --android-studio-dir=/snap/android-studio/current/android-studio
和:
flutter config --android-studio-dir=/snap/android-studio
但是运行后的结果 flutter doctor总是一样的,什么都不承认。
谢谢!

最佳答案

我通过 snap 安装了 flutter 和 android-studio。这为我修复了它:

flutter config --android-sdk="$HOME/Android/Sdk"
flutter config --android-studio-dir="/snap/android-studio/current/android-studio/"

关于android-studio - Flutter 未检测到 Android Studio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63356096/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com