- «Failed to find target with hash string ‘android-25′» when building hello_world example #9543
- Comments
- refi64 commented Apr 22, 2017
- Flutter Doctor
- refi64 commented Jun 14, 2017
- Morpheous7 commented Nov 13, 2017
- refi64 commented Nov 13, 2017
- Morpheous7 commented Nov 13, 2017 •
- refi64 commented Nov 13, 2017
- mit-mit commented Dec 6, 2017
- Hixie commented Dec 6, 2017
- mit-mit commented Dec 7, 2017
- Mnemoth42 commented Jan 15, 2018
- sssheridan5 commented Jan 15, 2018
- ShineHtetAungSourcecode commented May 26, 2018
- github-actions bot commented Sep 3, 2021
- Failed to find target with hash string ‘android-25’
- Related Posts
- android – How do I display a CalendarView in an AlertDialog?
- How do I convert a PSD design to Android xml?
- Failed to find target with hash string ‘android-23’ #5442
- Comments
- matijagrcic commented Jan 20, 2016
- facebook-github-bot commented Jan 20, 2016
- SeyfertCode commented Jan 22, 2016
- matijagrcic commented Jan 23, 2016
- matijagrcic commented Jan 23, 2016
- matijagrcic commented Jan 23, 2016
- не удалось найти цель с хэш-строкой android-23
- 18 ответов:
«Failed to find target with hash string ‘android-25′» when building hello_world example #9543
Comments
refi64 commented Apr 22, 2017
Both build-tools;25.0.2 and platforms;android-25 have been installed.
Flutter Doctor
The text was updated successfully, but these errors were encountered:
refi64 commented Jun 14, 2017
Found the problem! After reinstalling the SDK, it seems Gradle expects the SDK directory to be symlinked as android-studio-directory/tools , even if ANDROID_HOME is set correctly.
Fix: ln -s $ANDROID_HOME android-studio/tools
TBH though Gradle shouldn’t assume that.
Morpheous7 commented Nov 13, 2017
I’m gettin the same error. Still don’t know how you fixed this
refi64 commented Nov 13, 2017
@Morpheous7 Where is your Android SDK located, relative to the studio?
Morpheous7 commented Nov 13, 2017 •
They are both installed on my c:/programs directory. I just started with a reinstall of my SDK to ver 25.3. It all started with me trying to work on a project I’d built on my old pc that used that version. After downloading the app to my current desktop I started getting the same error you had but couldn’t work around it. I’m currently reinstalling my SDK (Closing android to do the install) and I’m hoping that fixes it
refi64 commented Nov 13, 2017
FWIW try moving your SDK to android-studio/tools , or letting Studio install it itself.
mit-mit commented Dec 6, 2017
Closing this issue; I believe this is all gradle, and not in flutter
Hixie commented Dec 6, 2017
@mit-mit Shouldn’t we handle this more gracefully though?
mit-mit commented Dec 7, 2017
It’s my understanding that we already fixed that recently. I just tried to introduce an error in my gradle file, and I see:
Mnemoth42 commented Jan 15, 2018
So I’m on a new computer, fresh install of Android Studio and am getting this message on my very first build. It is staggeringly dumbfounding to me that I’d get this after letting AS handle all the installation, and I can’t make heads or tails out of these fixes.
The only thing I can think of is that I created my new project on my E: drive, because I’m thinking saving my data on my small SSD system drive in users/docs is a terribly bad use of resources
sssheridan5 commented Jan 15, 2018
Same. I installed a fresh install 2 days ago, tried to do the android.developer.com’s official tutorial for a first app, and I’m getting this error. Windows 10; Android Studio 3.0.1, build #AI-171.4443003, built on November 9, 2017, so it’s not brand new.
When I go to the Run menu, the Run option is greyed out. When I go to Build > Make project, I get the following error:
ShineHtetAungSourcecode commented May 26, 2018
Try download SDK for API 25 from Android SDK Manager or by launching Android standalone SDK manager.
github-actions bot commented Sep 3, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Источник
Failed to find target with hash string ‘android-25’
Posted by: admin February 23, 2018 Leave a comment
I have Android Studio 2.2. I am trying to open a project, but I get the error “Failed to find target with hash string вЂandroid-25′”. Below the error message I see a link “Install missing platform(s) and synch project”. If I click this link, I get another error, which says
“The following packages are not available: – Package id
platforms;android-25”.
In the Android SDK tool, I can see “Android 7.0” (API level 24) already installed. On checking the details about Android verisons and its API levels, I found that Android Nougat has API levels 24-25. I would like to know how I can update the SDK from API24 to 25?
you don’t need to update anything. Just download SDK for API 25 from Android SDK Manager or by launching Android standalone SDK manager. The error is for missing platform and not for missing tool.
Well, I was suffering with this Issue but finally I found the solution.
Problem Starts Here:
[“Install missing platform(s) and sync project” (link) doesn’t work & gradle sync failed]
Problem Source: Just check out the app -> src-build.gradle and you will find the parameters
Note: You might find these parameters with different values e.g
compileSdkVersion 23 etc.
These above parameters in build.gradle creates error because their values are not compatible with your current SDK version.
The solution to This error is simple, just open a new project in your Android Studio, In that new project goto app -> src-build.gradle .
In build.gradle file of new project find these parameters:
In my case these are:
Now copy these parameters from your new project build.gradle file and post them in the same file of the other project(having Error).
I got similar problem
1: I tried to resolve with the answer which is marked correct above But I was not able to get the system setting which was quit amazing (On MacBook).
Most of the time such errors & issues comes because of replacing your grade file with other grade file ,due which gradel does not sync properly and while building the project issue comes . The issue is bascially related to non syncing for platform tools
Solution a: Go to File and then to Your project strucutre -modules -app-Properties -build tool version -click on options which is required for your project (if required build tool version not there chose any other). This will sync the grade file and now you can go to gradel and change target version and build tool version as per your requirement .you will prompted to download the required platform tool to sync it , now click on install tool version and let project to build
Solution b: Try Anuja Ans if you can get option of system setting and install platform tool.
You can open the SDK standalone by going to installation directory, just right click on the SDK Manager.exe and click on run as Administrator. i hope it will help.
the default gradle version 3.3 may have some bugs, I switched to gradle 3.5 and everything got ok
Make sure your computer is connected to the internet, then click on the link that comes with the error message i.e “install missing platform(s) and sync project” , give it a few seconds especially if your computer has low specs, it will bring up a window called SDK Quickfix Installation, everything is straightforward from there.
Related Posts
android – How do I display a CalendarView in an AlertDialog?
Questions: I’m trying to display the CalendarView in an Alert Dialog, but all that shows up is the month/year and the days of the week. These are the contents of the layout file:
How do I convert a PSD design to Android xml?
Questions: Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Over.
Источник
Failed to find target with hash string ‘android-23’ #5442
Comments
matijagrcic commented Jan 20, 2016
I have already installed API 23
Created my environment as per instructions for React Native Android on Windows but when running
react-native run-android I get the following
failed to find target with hash string ‘android-23’ in: C:\Users\matija\AppData\Local\Android\android-sdk\platform-tools
I’ve also updated build.gradle to use API 23.
Any help to would be great.
The text was updated successfully, but these errors were encountered:
facebook-github-bot commented Jan 20, 2016
Hey matijagrcic, thanks for reporting this issue!
React Native, as you’ve probably heard, is getting really popular and truth is we’re getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
- If you don’t know how to do something or something is not working as you expect but not sure it’s a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
- If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
- We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you’re using. Thank you for your contributions!
SeyfertCode commented Jan 22, 2016
Hi, i solved the problem.
move ‘android-23’ folder into : C:\Users\matija\AppData\Local\Android\android-sdk\platform-tools
re start terminal and have fun 🙂
matijagrcic commented Jan 23, 2016
@SeyfertCode Tried that already, same error.
matijagrcic commented Jan 23, 2016
Managed to solve this
You need to point ANDROID_HOME to the parent directory of platforms and platform-tools so in my case this is:
Everything works fine and on a VS Emulator as all my Ionic apps.
matijagrcic commented Jan 23, 2016
To document for further Windows users.
Be sure that you can access:
Fiddler works like a charm with VS Emulator so you instantly know what’s the problem.
Источник
не удалось найти цель с хэш-строкой android-23
при попытке построить OpenStreetMapView из git://github-е. ком/osmdroid/osmdroid, я получаю эту ошибку:
как я могу это исправить? Предыдущие вопросы, подобные этому, предполагают проверку того, что android 23 не установлен, но в моем случае это так.
Ниже приведена некоторая соответствующая информация:
ANDROID_HOME is D:UsersmyusernameAppDataLocalAndroidsdk
D:UsersmyusernameAppDataLocalAndroidsdkplatforms содержит каталог android-23, (а также android-19, android-21, android-22, android-MNC)
Я попытался изменить targetSdkVersion и compileSdkVersion на 22. Это приводит к тому, что сообщение об ошибке изменится на» android-22 «вместо»android-23».
SDK Manager:
18 ответов:
в моем случае очистка caché не сработала.
в Диспетчере SDK обязательно установите флажок «показать описания пакетов»; затем вы также должны выбрать «Google Api» для версии, которую вы готовы установить.
установите его, а затем вы должны быть в порядке
В Android Studio File -> Invalidate Caches/Restart решил проблему для меня.
Gradle время от времени становится глупым, и уничтожение кэша-это единственное решение, которое я нашел. Вы найдете скрытый .папка gradle под вашей домашней папкой пользователя и еще одна, где находится место проверки для osmdroid.
я исправил проблему для меня, открыв Android SDK Manager и установив инструменты сборки для всех 23.х.X версий.
смотрите на скриншоте.
Примечание: Я думаю, что это может быть ошибка в Android Studio.
- перейти к структуре проекта
- Выберите Модуль Приложения
- на первой вкладке «свойства» измените версию Compile SDK на API XX из Google API xx (например, API 23 вместо Google API 23)
- нажмите OK
- дождитесь завершения процесса on going, в моем случае я не получил ошибку в этот момент.
теперь вернуть скомпилированную версию Sdk обратно в Google API xx.
Если это не сработает, тогда:
- С помощью Google API (Google API xx вместо API xx) опустите версию инструмента сборки (например, Google API 23 и build tool версии 23.0.1)
- нажмите OK и дождитесь завершения процесса
- верните свою версию инструмента сборки к тому, что было до того, как вы изменили
- Нажмите Ok
- дождитесь завершения процесс.
- готово!
после этих рекомендуемых направлений, казалось, работал:
подсказка: Откройте Диспетчер SDK, запустив: / path / to / android / tools / android
вам потребуется: 1. Платформе SDK для Android-23 2. «Android SDK платформа-инструменты (последние) 3. «Android SDK Build-tools» (последняя версия)
была такая же проблема с другим номером, этот работал для меня:
нажмите на сообщение об ошибке в верхней части «Gradle project sync failed» , где текст говорит Open message view
в окне» Message Gradle Sync «в левом нижнем углу нажмите на предоставленное решение» установить отсутствует . «
при необходимости повторите 1 и 2
23:08 Gradle sync failed: не удалось найти цель с помощью хэш-строка ‘android-26’ В: C:\Users\vik\AppData\Local\Android\Sdk
Android SDK предоставляет решение в левом нижнем углу
это сработало для меня, изменив compileSdkVersion 24 и targetSdkVersion до 24 и изменить compile до com.android.support:appcompat-v7:24.1.0
1) Скачайте соответствующий SDK для Android через инструменты -> Андроид -> диспетчер -> СДК СДК инструменты (убедитесь, что вы ‘Показать подробности пакета’) проверено. Ваш случай будет Android 6.0 (Marshmallow / API level 21)
2) Кроме того, открыть свой build.gradle файл и обновить следующие атрибуты:
- compileSdkVersion
- buildToolsVersion
- targetSdkVersion
либо наиболее последняя версия Android API, которую вы установили / другая установленная версия, которую вы хотите использовать (хотя я всегда рекомендую использовать последнюю версию по обычным причинам: исправления ошибок и т. д.)
если вы следуете шагу 2, также важно, чтобы вы не забыли обновить версию библиотеки поддержки Android, если ваше приложение использует ее. Это можно найти в dependencies раздел вашего файла сборки и выглядит примерно так это:
(вместо 27.0.2 С самой последней версией библиотеки поддержки для уровня API, который вы собираетесь использовать с вашим приложением)
Откройте Диспетчер Android SDK и обновите его с помощью последней версии.
Источник