- Флаттер не находит андроид sdk
- 18 ответов
- [Solved] Unable to locate android SDK flutter
- How Unable to locate android SDK flutter Occurs ?
- How to Solve Unable to locate android SDK flutter?
- Solution 1 : Flutter Config
- Solution 2 : Set ANDROID_HOME Path
- Solution 3 : Download Android SDK in android studio
- Summery
- Flutter doctor — Unable to locate Android SDK #45007
- Comments
- parang17 commented Nov 15, 2019
- Steps to Reproduce
- X Unable to locate Android SDK. #13078
- Comments
- sjx19900424 commented Nov 18, 2017
- bledfort commented Feb 24, 2018
- sam43 commented Feb 27, 2018
- DevXtreme0 commented Feb 27, 2018 •
- sam43 commented Feb 28, 2018
- sam43 commented Feb 28, 2018 •
- AbderrahmeneDZ commented May 15, 2018 •
- sumiaggarwal commented May 27, 2018
- zoechi commented Aug 3, 2018
- mahbobyosf commented Aug 28, 2018
- arsalan0312 commented Sep 5, 2018
- zoechi commented Sep 5, 2018
- zoechi commented Oct 8, 2018
- JosephDunivan commented Dec 5, 2018
- JosephDunivan commented Dec 5, 2018 •
- QuietLakeStone commented Dec 15, 2018
- DevLuuk commented Jan 8, 2019 •
- Qinxianshen commented Jan 30, 2019
- ValmirJuniorr commented Mar 20, 2019
- codingcity4747 commented Mar 20, 2019
- DaywisonSilva commented Sep 5, 2019
- avavirus3 commented Mar 18, 2020 •
Флаттер не находит андроид 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 против каждого соглашения
Запустить флаттер доктор это будет работать нормально.
Источник
[Solved] Unable to locate android SDK flutter
Hello Guys How are you all? Hope You all are fine. I Just installed flutter SDK and android studio on my windows machine. When I run the flutter doctor command it gives me the following error in my terminal. Unable to locate android SDK flutter. So today Here I come with all possible solutions for this error.
We are providing you all possible solutions to solve this error. let’s start this article without wasting your time.
Table of Contents
How Unable to locate android SDK flutter Occurs ?
I Just installed flutter SDK and android studio on my windows machine. When I run the flutter doctor command it gives me the following error in my terminal. Unable to locate android SDK flutter.
How to Solve Unable to locate android SDK flutter?
Question:
Answer:
- How to Solve Unable to locate android SDK flutter?
To solve Unable to locate android SDK flutter issue just give Android SDK that path to flutter config. In your terminal run both commands. flutter config –android-sdk /path/to/android/sdk. Or Set ANDROID_HOME Path. First, create a new environment variable called ANDROID_HOME.
Unable to locate android SDK flutter
To solve Unable to locate android SDK flutter issue just give Android SDK that path to flutter config. In your terminal run both commands. flutter config –android-sdk /path/to/android/sdk. Or Set ANDROID_HOME Path. First, create a new environment variable called ANDROID_HOME.
Solution 1 : Flutter Config
Your Problem Is very Clear. Flutter cant find Android SDK PATH that’s why you are facing this problem.
If you have already Downloaded Android SDK then just give that path to flutter config. In your terminal run both commands
Solution 2 : Set ANDROID_HOME Path
- First create a new environment variable called ANDROID_HOME
- For me, who has installed Android Studio, the path was C:\Users\Tim\AppData\Local\Android\sdk or %LOCALAPPDATA%\Android\sdk .
- Then you need to add tools and platform-tools to your Path variable
- Use you %ANDROID_HOME% variable to make it dynamic.
Solution 3 : Download Android SDK in android studio
- Open Android Studio.
- Go to File -> Project Structure OR Ctrl + Alt + Shift + S
- Then choose SDK platform.
- If there are download option then just download it.
Summery
So, It’s All About this error. I hope this tutorial helps you to solve your error. Please Comment Below if You stucks anywhere with my code.
Источник
Flutter doctor — Unable to locate Android SDK #45007
Comments
parang17 commented Nov 15, 2019
Steps to Reproduce
Target Platform: Linux
Target OS version/browser: Ubuntu 18.04
Devices:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Linux, locale en_US.UTF-8)
[!] Android toolchain — develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from:
https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK
components.
(or visit https://flutter.dev/setup/#android-setup for detailed
instructions).
If the Android SDK has been installed to a custom location, set
ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.39.2)
[!] Connected device
! No devices available
[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Linux, locale en_US.UTF-8)
• Flutter version 1.9.1+hotfix.6 at /home/youngjun/Documents/flutter
• Framework revision 68587a0 (9 weeks ago), 2019-09-13 19:46:58 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[!] Android toolchain — develop for Android devices
• Android SDK at /usr/lib/android-sdk
• Android NDK location not configured (optional; useful for native profiling
support)
✗ Unable to locate Android SDK.
Install Android Studio from:
https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK
components.
(or visit https://flutter.dev/setup/#android-setup for detailed
instructions).
If the Android SDK has been installed to a custom location, set
ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
[✓] Android Studio (version 3.5)
• Android Studio at /snap/android-studio/81/android-studio
• Flutter plugin version 41.1.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build
1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.39.2)
• VS Code at /usr/share/code
• Flutter extension version 3.6.0
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
The text was updated successfully, but these errors were encountered:
Источник
X Unable to locate Android SDK. #13078
Comments
sjx19900424 commented Nov 18, 2017
X Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location.
I have installed Android SDK ,and set $ANDROID_HOME. But ‘flutter doctor’ show the error again.
The text was updated successfully, but these errors were encountered:
bledfort commented Feb 24, 2018
Same issue, why there is no responses? weird
sam43 commented Feb 27, 2018
same issue. stucked. Help!
DevXtreme0 commented Feb 27, 2018 •
try to Install Android studio again, with default installation folder. OR now I found a way to solve this problem .. this is the way i solved this issue:
(Reminder — before doing below steps make sure you already setup environment variable for flutter doctor like , variable name as «Path » variable value as «flutter\bin;» )
1st go to Control Panel -> click User Accounts -> again click User Account -> you can see option called «change my environment variables» click it -> in popup small window click NEW and type variable name as ANDROID_HOME variable value as «your Android SDK Location » Example : «Partition Letter:\AndroidStudioSDK» , Save this settings.
After that go to the windows power shell type flutter doctor and click enter, you can see some results.
sam43 commented Feb 28, 2018
Wow, this worked perfectly, thank you. but I can’t able start any device to run the sample project. Can you help me with this last thing please? here is the attachment.
@PillowDeveloper
sam43 commented Feb 28, 2018 •
Update. working fine. But have to start the project from PowerShell and run it. Note: Close your AS 3.0 if it is running. steps: create app -> cd -> flutter run. Boom! Happy coding. 🙂
AbderrahmeneDZ commented May 15, 2018 •
I had the same problem,
I did the following steps :
*/ Open system properties
*/ Environment variables
*/ create new system variable
*/ name : ANDROID_HOME
*/ value : copy your SDK path
*/ close your current cmd, and restart it
*/ run flutter doctor
this should work on windows
sumiaggarwal commented May 27, 2018
thanks worked like a charm 🙂
zoechi commented Aug 3, 2018
@sjx19900424 is this still an issue or can this be closed?
mahbobyosf commented Aug 28, 2018
This worked perfectly, thank you.
arsalan0312 commented Sep 5, 2018
I have the same issue after following step.
/ Open system properties
*/ Environment variables
*/ create new system variable
*/ name : ANDROID_HOME
*/ value : copy your SDK path
*/ close your current cmd, and restart it
*/ run flutter doctor
zoechi commented Sep 5, 2018
check the SDK config in android/local.properties
You can use flutter config to update it.
Can you still reproduce when the setting is updated to the new path?
zoechi commented Oct 8, 2018
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don’t hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
JosephDunivan commented Dec 5, 2018
check the SDK config in android/local.properties
You can use flutter config to update it.
Can you still reproduce when the setting is updated to the new path?
@zoechi When you say «You can use flutter config to update it.» can you elaborate? The issue is flutter expects the path to point to /usr/local/share/android-sdk, however android studio installs everything in users//library/android/sdk and has for quite some time. The issue seems to be that redirecting this expected path to the actual path in .bash_profile does not solve the issue.
JosephDunivan commented Dec 5, 2018 •
Using the command flutter config —android-sdk $HOME/Library/Android/sdk on Mac OS seems to have immediately solved my issues if anyone is looking for a more specific directive.
QuietLakeStone commented Dec 15, 2018
I finally solved the problem. >>Ubuntu 18 android-ndk-r16b-linux-x86_64.zip
Then modify the environment and AS configure,restart AS,no devices ->Android Device
I hope I can help you all.
DevLuuk commented Jan 8, 2019 •
I solved it on Ubuntu by adding this line: flutter config —android-sdk /path/to/android/sdk in the terminal in Android Studio.
Qinxianshen commented Jan 30, 2019
I had the same problem,
I did the following steps :
*/ Open system properties
*/ Environment variables
*/ create new system variable
*/ name : ANDROID_HOME
*/ value : copy your SDK path
*/ close your current cmd, and restart it
*/ run flutter doctor
this should work on windows
awesome ! It‘s work for me!Thank you
ValmirJuniorr commented Mar 20, 2019
I solved it on Ubuntu by adding this line: flutter config —android-sdk /path/to/android/sdk in the terminal in Android Studio.
it works perfect to me, thanks buddy.
codingcity4747 commented Mar 20, 2019
I had the same problem,
I did the following steps :
*/ Open system properties
*/ Environment variables
*/ create new system variable
*/ name : ANDROID_HOME
*/ value : copy your SDK path
*/ close your current cmd, and restart it
*/ run flutter doctor
this should work on windows
this worked for me, but I mention that after adding ANDROID_HOME path to your env variables you should restart your computer before checking flutter doctor report
good luck
DaywisonSilva commented Sep 5, 2019
[X] Android toolchain — develop for Android devices
X ANDROID_HOME = C:\Users\Daywi\AppData\Local\Android\Sdk
but Android SDK not found at this location.
avavirus3 commented Mar 18, 2020 •
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18363.657], locale en-US)
[!] Android toolchain — develop for Android devices
X Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/setup/#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
[!] Android Studio (not installed)
[!] IntelliJ IDEA Community Edition (version 2018.2)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.41.1)
[!] Connected device
! No devices available
Источник