- Флаттер не находит андроид sdk
- 18 ответов
- Flutter Cannot Identify Android Studio on Linux Mint 20 #71798
- Comments
- byzramku commented Dec 6, 2020 •
- Steps to Reproduce
- Flutter Doctor — «Android Studio (not installed)» #27283
- Comments
- vnagendra commented Jan 30, 2019
- zoechi commented Jan 30, 2019
- dariotrombello commented Jan 30, 2019
- zoechi commented Jan 30, 2019
- kangwang1988 commented Jan 30, 2019 •
- vnagendra commented Jan 30, 2019
- kangwang1988 commented Jan 31, 2019
- IamStupidMan commented May 9, 2020
- shvamabps commented Oct 15, 2020 •
- samiq commented Oct 16, 2020
- shelendravashishtha2 commented Oct 16, 2020
- FRANCKWILFRIEDNGBO commented Oct 16, 2020 •
- samiq commented Oct 17, 2020
- shelendravashishtha2 commented Oct 17, 2020
- djaBalasbas commented Oct 21, 2020
- shvamabps commented Oct 22, 2020
- samiq commented Oct 31, 2020
- samiq commented Oct 31, 2020
- nickcollie commented Nov 8, 2020
- jcstange commented Nov 19, 2020
- gamenic-pawanrai commented Nov 20, 2020
- shvamabps commented Nov 28, 2020
- hoccpan commented Nov 28, 2020
- b1414m commented Dec 21, 2020
- shivamrsoft commented Dec 21, 2020
- b1414m commented Dec 21, 2020 •
- shivamrsoft commented Dec 21, 2020
- b1414m commented Dec 21, 2020
- notandyvee commented Feb 4, 2021
- Rithika-29 commented Feb 19, 2021
- Rithika-29 commented Feb 19, 2021
- pureabsolute commented May 8, 2021
- KomalPatel-github commented May 18, 2021
Флаттер не находит андроид sdk
Я просто попытался установить флаттер, и так как у меня уже была Android Studio и Android SDK, я просто следил за установкой флаттера. Вот моя проблема: когда я бегу
Это говорит мне
Что говорит мне о том, что флаттер не находит мой Android SDK (хотя это именно тот путь, который использует android studio — и android studio работает нормально)
Я уже пытался переустановить SDK, но это не сработало.
Я очень благодарен за любую помощь с этим.
18 ответов
Flutter предоставляет команду для обновления пути Android SDK:
Используйте flutter config —android-sdk
Я решил эту проблему следующим шагом,
1) перейти к -> системная среда -> переменные среды -> системная переменная
2) создайте имя новой переменной ANDROID_HOME и значение D: \ Androidsdk \ tools (пользовательский путь Android SDK).
3) конкатенируйте этот путь D: \ Android Sdk \ platform-tools в значение переменной Path , используя «;». (также в системной переменной)
4) вот и все, перезагрузите компьютер, чтобы применить изменения и попробуйте еще раз — порхает доктор.
Для меня добавление пути Android SDK не помогло.
Я удалил все свои SDK (в основном просто удалил эту папку Android. Использовал этот путь «C: \ Users \ your_user_name \ AppData \ Local \ Android», чтобы найти его.)
Затем я переустановил все необходимые SDK с помощью Android Studio. (Обязательно установите более 1 SDK, я не знаю, почему он не работает, если вы устанавливаете только 1).
Тогда, если я запущу Flutter Doctor, все работает отлично.
Вы должны установить переменную ANDROID_HOME в SDK.
Создайте новую переменную по имени и установите ее в каталог установки.
Убедитесь, что SDK не ниже 2 подпапок с диска c или любого корневого диска Windows.
Сначала откройте Android SDK Manager и убедитесь, что установлены необходимые SDK.
Теперь откройте менеджер SDK, скопируйте путь SDK. Открыть cmd
Теперь снова измените dir на внутреннюю папку в build-tools. проверьте наличие или имя проблемы файла aapt.exe.
Я потратил много времени на решение этой проблемы.
В конце концов, то, что сработало, собиралось спроектировать настройки в Android Studio, инструменты SDK, снять флажок скрывать устаревшие пакеты и установить пакет устаревших инструментов SDK.
Затем запустите «flutter doctor» —android-licenses, а затем «flutter doctor» показала зеленую галочку на моей панели инструментов Android.
Надеюсь, это кому-нибудь поможет.
Для пользователей Mac
Вчера все работало нормально, теперь ад сломался. Я смог это исправить.
Моя проблема была с ANDROID_HOME
Если вы сделали то же самое, измените его на:
.bash_profile имеет
Flutter предназначен для использования последней установленной версии Android. Так что, если у вас есть неполная загрузка последней версии Android, Flutter попытается использовать это.
Поэтому либо завершите установку, либо удалите ее полностью. Версии Android можно найти по адресу: /home/
Я установил свой Android SDK вручную с помощью командной строки, и мне удалось устранить ошибки такого рода, когда я пытался настроить свою среду разработки. Если вы хотите решить ее, как я, просто выполните следующие шаги, которые Я разместил в GitHub комментарий в связанной проблеме:
Надеюсь, это может кому-нибудь помочь! Bye !
Сначала запустите обновление flutter со своего терминала. Если вы получили следующую ошибку,
- Сначала зайдите в android studio, Настройки-> Настройки системы-> Нажмите на стрелку расширения
- Затем перейдите к опции Android SDK и добавьте соответствующий SDK в проект, затем перейдите в Project Structure и добавьте соответствующий SDK в Structure проекта.
- Затем запустите обновление флаттера в терминале
Удаление и переустановка Android Studio устраняет проблему с SDK.
SdkManager удаляет версию API28 и повторно загружает версию API28, устанавливая пути Flutter и Dart в AndroidStudio, и теперь все работает нормально. изображение
Если вы не нашли правильный путь SDK, то: 1. Откройте Android Studio 2. Перейдите в Инструменты 3. Перейдите в SDK Manager 4. Вы найдете «Расположение Android SDK»
Скопируйте путь и отредактируйте «Переменную среды». После этого перезапустите и запустите cmd. Затем запустите «Доктор флаттер» Надеюсь, это сработает!
Вам нужно исправить путь к SDK вручную, пока это не будет исправлено в файле
Добавьте $ANDROID_HOME\sdk\tools и $ANDROID_HOME\sdk\platform-tools в переменную среды PATH .
В моей папке SDK была пустая папка (/build-tools/29.0.0)
Я удалил его, и он работал нормально
Трепетание говорит, что версия инструмента сборки Sdk (exp: android toolchain — разработка для устройств Android (android sdk 28.0.3)) version = 28.0.3. Перейдите по адресу home / username / Android / Sdk / build-tools удалить эту версию (28.0.3) и исправлена ошибка
Выберите папку для установки (я назвал ее BASE_PATH ) и используйте следующие команды для установки SDK с флаттером:
Установите SDK
Я использовал отдельную папку для SDK, потому что он будет добавлять родительские папки.
Установите Flutter
Export Vars (вы можете добавить их в свой .bashrc )
Пожалуйста, прежде всего проверьте ваш последний SDK первый шаг:
запустить флаттер доктор —android-licenses нажать Y против каждого соглашения
Запустить флаттер доктор это будет работать нормально.
Источник
Flutter Cannot Identify Android Studio on Linux Mint 20 #71798
Comments
byzramku commented Dec 6, 2020 •
Steps to Reproduce
- Flutter Cannot Identify my Android Studio Installation
- I’ve Installing Android Studio Using Snap
- I’ve Installing Flutter Using Snap
am Using Linux Mint 20
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.4, on Linux, locale en_US.UTF-8)
[!] Android toolchain — develop for Android devices (Android SDK version 30.0.2)
✗ Android license status unknown.
Run flutter doctor —android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/linux#android-setup for more details.
[!] Android Studio (not installed)
[✓] VS Code (version 1.51.1)
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
byzramku@thinkstation:
$ flutter doctor -v
[✓] Flutter (Channel stable, 1.22.4, on Linux, locale en_US.UTF-8)
• Flutter version 1.22.4 at /home/byzramku/snap/flutter/common/flutter
• Framework revision 1aafb3a (3 weeks ago), 2020-11-13 09:59:28 -0800
• Engine revision 2c956a31c0
• Dart version 2.10.4
[!] Android toolchain — develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /home/byzramku/Android/Sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: /usr/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04)
✗ Android license status unknown.
Run flutter doctor —android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/linux#android-setup for more details.
[✓] VS Code (version 1.51.1)
• VS Code at /usr/share/code
• Flutter extension version 3.17.0
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
The text was updated successfully, but these errors were encountered:
Источник
Flutter Doctor — «Android Studio (not installed)» #27283
Comments
vnagendra commented Jan 30, 2019
When I run flutter doctor, I see the following output..
I am not sure if this should be an issue. IntelliJ licensed edition is a valid IDE to develop Flutter in. I am sure so is vscode and a few others that are supported.
Is there an actual issue or should this message be amended?
There was one point in the beta channel when this went away. But since Flutter 1.0 this message has come back (on the beta channel). Perhaps a regression?
The text was updated successfully, but these errors were encountered:
zoechi commented Jan 30, 2019
Please add the output of flutter doctor -v .
dariotrombello commented Jan 30, 2019
This isn’t an issue. Just ignore it. I also only use vscode and get this «issue». Maybe it would be good changing that issue to a info or warning because it could unsettle new flutter developers.
zoechi commented Jan 30, 2019
Seems you mean something like #25719
I was interested in the output of flutter doctor -v to possibly get more details why it thinks it is not installed .
kangwang1988 commented Jan 30, 2019 •
@vnagendra
I’m closing this issue.
Feel free to comment below, like result for flutter doctor -v
I was interested in the output of flutter doctor -v to possibly get more details why it thinks it is not installed.
vnagendra commented Jan 30, 2019
Apologies for the delay in response. @zoechi — You are correct. I should’ve checked the other issue. I tried to find, but clearly didn’t do a good job.
My point originally was
- In my specific case that «warning» is correct. I do not have Android Studio installed. However that warning is also misleading IMO to a new Flutter developer to mean «there is something wrong with my installation». I was referring to maybe changing this or removing it entirely to be something along the lines of
- If Android Studio is installed, then check plugins
- If not, nothing to do.
- In theory if I have flutter installed, while not pleasant, I can write code using vi 🙂 I see no reason to raise an error/warning relating to IDEs, especially when they are not even installed! (or let’s be fair and also complain that I don’t have VSCode installed as well).
kangwang1988 commented Jan 31, 2019
Track this issue under: #25719
IamStupidMan commented May 9, 2020
I got the same issue,the output of flutter doctor -v is like below
But,I installed AS actually
shvamabps commented Oct 15, 2020 •
I also just received thee same issue with the flutter. I had installed android studio.
And the android studio suppose to look this way??
samiq commented Oct 16, 2020
this happened to me as well windows with the current version, I have Android Studio 4.1 installed before I downloaded flutter zip from the website. Ran flutter doctor and it didn’t recognise Java, Android SDK or Android Studio. I had to add JAVA_HOME to the path (to point to the one in Android Studio), doing it then it found the android sdk. but no Android Studio yet.
shelendravashishtha2 commented Oct 16, 2020
I’m also having same problem and I’ve also installed android studio. The problem started when I updated my android studio after that I’ve even reinstalled android studio but this problem still stopping me.
FRANCKWILFRIEDNGBO commented Oct 16, 2020 •
I think we all have the same error so basically it may be due to the recent update of Android studio that happened so if someone know how to help our common problem .
we look forward to hear from you
samiq commented Oct 17, 2020
I think it has something to do with Android Studio 4.1 and the current Flutter setup, I changed channels to the beta channel and upgraded and now flutter doctor works.
shelendravashishtha2 commented Oct 17, 2020
@FRANCKWILFRIEDNGBO you can just reinstall the plugin in your android studio and if still problem doesn’t resolve simply ignore the warning and it would work fine anyway
djaBalasbas commented Oct 21, 2020
I have the same issue after updating to Android Studio 4.1
shvamabps commented Oct 22, 2020
@samiq Hey! I tried this changing channel thing. I changed it to dev and still the same situation.
samiq commented Oct 31, 2020
there is something I did prior to switching branches and it was to set the pointer to the android studio directory using —android-studio-dir flag of flutter config , now what’s interesting is that Android Studio’s flutter plugin is doesn’t see flutter’s sdk’s despite of it being in the PATH so looks like there is some funny things happening for sure
samiq commented Oct 31, 2020
now for what is worth I just did a fresh install of Android Studio 4.1 and flutter on a Windows 10 machine running October’s service pack of Windows and it recognised Android Studio but not the plugins (this is without configuring the studio directory), but same, Android Studio didn’t recognize Flutter by default so had to set it up.
nickcollie commented Nov 8, 2020
I am no expert. Especially not on Windows.
I had this problem on Ubuntu when I used the snap install, but the problem was resolved when I installed android studio from the repository.
jcstange commented Nov 19, 2020
On Ubuntu, if you installed from snap, you should set these two parameters:
gamenic-pawanrai commented Nov 20, 2020
On Ubuntu, if you installed from snap, you should set these two parameters:
Thanks man for the answer
shvamabps commented Nov 28, 2020
@jcstange will that configuration be global or it will be instantial.
hoccpan commented Nov 28, 2020
On Ubuntu, if you installed from snap, you should set these two parameters:
I manually config these two as guided. but the plug-in still doesn’t work:
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
Although I already installed flutter ( and dart) through studio->settings->Plugin->Marketplace.
Seems flutter didn’t recognize these plugins.. anything else I can do? (I am using linux)
b1414m commented Dec 21, 2020
I am no expert. Especially not on Windows.
I had this problem on Ubuntu when I used the snap install, but the problem was resolved when I installed android studio from the repository.
How did you delete the one that you downloaded from snap? And what else did you have to do ?
shivamrsoft commented Dec 21, 2020
@b1414m kindly use this command to remove the flutter from snap
sudo snap remove flutter
b1414m commented Dec 21, 2020 •
@b1414m kindly use this command to remove the flutter from snap
sudo snap remove flutter
Thanks I solved it.
For those interested:
- Im on Ubuntu installing Flutter 4.1
- I was getting Android studio not found
- I Logged into android studio > File > Project Structure > Sdk | there I manually selected the SDK
- Then I added the following in .bashrc —> flutter config —android-studio-dir=»/home/bundu/Documents/dev/android-studio»
At this point flutter doctor was now able to find Android Studio but not Flutter and Dart Plugins so I did the following:
- Switch Channel: First flutter channel to see your current channel (I was on Stable channel) and then flutter channel Dev to switch from Stable to Dev
- upgrade flutter
- You might have to go to Android Studio to manually install the plugins or they might have already been installed
- restart
- close edit and run flutter doctor -v again
Note: I did not have to uninstall flutter via snap
shivamrsoft commented Dec 21, 2020
@b1414m Thanks man for the steps. This thing has been bugging for days. I guess this would finally get solved at Flutter end too in the new update.
b1414m commented Dec 21, 2020
@b1414m Thanks man for the steps. This thing has been bugging for days. I guess this would finally get solved at Flutter end too in the new update.
Hopefully. I was stuck on this for the whole weekend.
notandyvee commented Feb 4, 2021
@b1414m great find. Its February, still not in the stable channel. For those not wanting to be on the bleeding edge. Us the master channel. Works there at the moment.
Rithika-29 commented Feb 19, 2021
@IamStupidMan can u help me how to solve this issue
Rithika-29 commented Feb 19, 2021
I have installed flutter and dart pluggins , even though am getting an error
pureabsolute commented May 8, 2021
flutter config —android-studio-dir
The configuration seems to stick, and flutter doctor is clean. This is with default flutter, installing default android studio (4.2) afterwards, setting java_home to the android jdk (not the sdk, but I wouldn’t think that would matter).
KomalPatel-github commented May 18, 2021
@b1414m kindly use this command to remove the flutter from snap
sudo snap remove flutter
Thanks I solved it.
For those interested:
Note: I did not have to uninstall flutter via snap
Can anyone find a similar solution for Windows?
Источник