Flutter未检测到Android Studio [英] Flutter not detecting Android Studio
本文介绍了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.
我的android studio位于/snap/android-studio/current/android-studio我也尝试过跑步:
My android studio is located on /snap/android-studio/current/android-studio I 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文