本文介绍了Flutter 未检测到 Android Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在我的 Ubuntu 机器上正确安装了 flutter.我还安装了 Android Studio 及其插件 Flutter 和 Dart.无论如何,当我跑步时:
I have installed flutter correctly on my Ubuntu machine. I have also installed Android Studio and its plugins Flutter and Dart.Anyway, when I run:
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.
我的安卓工作室位于/snap/android-studio/current/android-studio我也试过跑步:
My android studio is located on /snap/android-studio/current/android-studioI have also tried running:
flutter config --android-studio-dir=/snap/android-studio/current/android-studio
还有:
flutter config --android-studio-dir=/snap/android-studio
但是运行flutter doctor
后的结果总是一样,没有识别.
But the result after running flutter doctor
is always the same, nothing recognized.
谢谢!
推荐答案
我通过 snap 安装了 flutter 和 android-studio.这为我修复了它:
I installed both flutter and android-studio through snap. This fixed it for me:
flutter config --android-sdk="$HOME/Android/Sdk"
flutter config --android-studio-dir="/snap/android-studio/current/android-studio/"
这篇关于Flutter 未检测到 Android Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!