- How to Update Gradle in Android Studio?
- Different Ways To Update Gradle
- Method 1
- Method 2
- Method 3
- How to update Gradle plugin in Android Studio
- 2 Answers 2
- Как обновить gradle в Android studio?
- 13 ответов
- Шаг 1 (Используйте оболочку gradle по умолчанию)
- Шаг 2 (Выберите нужную версию gradle)
- официальные ссылки
- How to update gradle in android studio?
- 14 Answers 14
- Step 1 (Use default gradle wrapper)
- Step 2 (Select desired gradle version)
- Official links
- How to check the gradle version in Android Studio?
- 6 Answers 6
How to Update Gradle in Android Studio?
The Android Studio build system is based on Gradle, and the Android Gradle plugin adds several features that are specific to building Android apps. Although the Android plugin is typically updated in lock-step with Android Studio, the plugin (and the rest of the Gradle system) can run independent of Android Studio and be updated separately. For the best performance, you should use the latest possible version of both Gradle and the plugin. When you update Android Studio, you may receive a prompt to automatically update the Android Gradle plugin to the latest available version. You can choose to accept the update or manually specify a version based on your project’s build requirements. In this article, we are going to discuss both methods. So, let’s dive into the five different ways in which Gradle can be updated.
Different Ways To Update Gradle
Method 1
Step 1: Open Android Studio and navigate to File → Settings
Then just click on Build, Execution, Deployment Tab Build → Tools → Gradle → Use default Gradle wrapper (recommended) option.
Step 2: Selecting desired Gradle version.
Go to File → Project Structure
Then click on the Project option.
then choose the latest version of Gradle. After that click on Ok. Latest stable versions you can use with Android Studio 4.1.2 (March 2021):
Method 2
Open gradle-wrapper.properties(go to Gradle > wrapper > gradle-wrapper.properties and manually change the distributionUrl property in the file.
Method 3
Grab latest version supported by Android Studio: http://www.gradle.org/downloads (Currently 1.9, 1.10 is NOT supported by AS yet)
Install: Unzip to anywhere like near where AS is installed: C:\Users[username]\gradle-1.9\
Then navigate to File -> Settings
Then click on Gradle -> Service directory path: (Change to folder you set above) -> Click ok. The status on the bottom should indicate it’s busy & the error should be fixed. Might have to restart.
Источник
How to update Gradle plugin in Android Studio
Inside Android Studio I’m getting the error:
If I click «Close this dialog and update the plugin» it goes to another prompt asking whether to update. Clicking «Update» appears to do nothing except close the prompt.
All other similar issues and advice are from a few years ago and the latest version of AndroidStudio has a different interface and have not helped in this situation.
UPDATE: Below is a requested screenshot of the AndroidStudio UI for setting up project structure:
2 Answers 2
In Android Studio do the following:
1. File -> project structure
2. Select «project» from the left hand side.
3. On the right hand side under «Android Gradle Plugin Version» use the drop-down menu to select the Gradle plugin version you desire.
4. Press «Apply» and then «Ok»
If for some reason you could not do that, you can try:
1. Under «Gradle Scripts» choose «build.gradle(project: . )».
2. From the right hand side under «dependencies» change the build gradle version to the required or latest one on this line:
3. Do not forget to sync on the top right hand side
Источник
Как обновить gradle в Android studio?
Я установил Android Studio 0.1.9. Сегодня я получил и обновился до версии 0.2 и, конечно, обновился. После установки я перезапустил Android Studio, но теперь я получаю это сообщение:
проект использует старую версию плагина Android Gradle. Этот минимальная поддерживаемая версия 0.5.0. Пожалуйста, обновите версию com зависимости.андроид.инструменты.построить:Gradle в’
как мне это сделать? Я не могу найти никаких инструментов обновления для gradle плагин в Android studio.
13 ответов
обновить gradle легко (Март 2018):
Шаг 1 (Используйте оболочку gradle по умолчанию)
File→Settings→Build, Execution, Deployment→Build Tools→Gradle→использовать оболочку Gradle по умолчанию (рекомендуется)
Шаг 2 (Выберите нужную версию gradle)
следующий таблица показывает, какая версия ш совместим с конкретной версией Android плагин для Gradle:
последние версии, которые вы можете использовать с Android Studio 3.2 (октябрь 2018):
официальные ссылки
Это может быть не точный ответ для OP, но это ответ на название вопроса: Как обновить Gradle в Android Studio (AS):
- получить последнюю версию поддерживается как:http://www.gradle.org/downloads (В настоящее время 1.9, 1.10 пока не поддерживается)
- Install: распаковать в любом месте, как рядом, где как установлено: C:\Users[имя пользователя]\gradle-1.9\
- открыть как: Файл- > Настройки — >Gradle — >путь к каталогу служб: (изменить на папка, которую вы установили выше) ->нажимать OK. Статус внизу должен указывать, что он занят и ошибка должна быть исправлена. Возможно, придется перезапустить как
после выпуска android studio V 3.0 (стабильный),он покажет всплывающее окно, Если доступно обновление gradle
вручную, просто измените версию gradle в верхний уровень (уровень проекта) до последней,
проверьте ниже диаграммы
открыть >Структура Проекта>Проект
Android Studio имеет встроенный структура проекта меню для проверки и обновления gradle и плагина, используемых в текущем проекте.
ниже веб-сайт дает подробное объяснение о том, как обновить ш и плагин Gradle в из Android Studio.
для тех, у кого все еще есть эта проблема (например, для переключения с 2.8.0 на 2.10.0), перейдите в файл gradle-обертка.свойства и установить distributionUrl как способ.
Я изменил 2.8.0 на 2.10.0 и не забудьте синхронизировать после
открыть свой корень build.gradle файл и изменить версию Gradle, как это
для совместимости версий Gradle это видеть.
на Mac, откройте терминал и выполните следующие команды как в — инструкции:
после завершения установки терминал спросит, следует ли установить его в качестве версии по умолчанию, поэтому введите y и сделайте его версией по умолчанию.
Теперь откройте Android Studio — > Терминал и выполните следующую команду
Я пока не могу комментировать.
то же, что и Кевин, но с другим шагом пользовательского интерфейса:
Это может быть не точный ответ для OP, но это ответ на название вопроса: Как обновить Gradle в Android Studio (AS):
- получить последнюю версию поддерживается как:http://www.gradle.org/downloads (В настоящее время 1.9, 1.10 пока не поддерживается)
- Install: распаковать в любом месте, как рядом, где установлен AS: C:\Users[имя пользователя]\gradle-1.9\
- открыть как: Файл- > Настройки — >сборка, выполнение, развертывание->инструменты сборки-> Gradle->путь к каталогу служб: (перейдите в папку, указанную выше) ->нажмите ok. Статус внизу должен указывать, что он занят и ошибка должна быть исправлена. Возможно, придется перезапустить как
выберите Файл > Параметры > сборки,выполнения,развертывания > построить инструменты > ш ш начало пути
теперь установите использовать оболочку gradle по умолчанию и редактировать Project\gradle\wrapper\gradle-wrapper.файлы свойств поля distributionUrl такой
Это работает для меня:
просто перейдите к ‘ / home / your-user/.gradle / wrapper / dists/’
удалить все внутри этого
Он будет заменен на Android studio
при запуске терминала: ионная эмуляция android
для меня я скопировал папку шрифтов из активов в папку res и вызвал проблему, потому что Android Studio не принимала заглавные имена. Я переключился в режим просмотра проекта и удалил его, а затем добавил его как файл ресурсов шрифта, щелкнув правой кнопкой мыши папку res.
большую часть времени вы можете иметь Android Studio автоматически обновлять плагин Gradle.
Если ваша версия плагина Gradle позади, Instant Run, скорее всего, не будет работать. Поэтому, если вы перейдете в Настройки мгновенного запуска (настройки > сборка, выполнение, развертывание > мгновенный запуск), вы увидите кнопку Обновить проект в правом верхнем углу (изображение ниже). Нажатие на это обновит как оболочку Gradle, так и инструменты сборки.
Если ваша кнопка запуска серая. Вот как я это исправил.
перейдите в меню Выполнить, а затем нажмите это:
затем он запустит ваш эмулятор, и ваша кнопка запуска снова станет зеленой, и вы можете использовать ее. Вот как я это исправил.
Источник
How to update gradle in android studio?
I installed Android Studio 0.1.9. Today I got and update to version 0.2 and of course I updated. After the installation I restarted Android Studio but now I get this message:
Project is using an old version of the Android Gradle plug-in. The minimum supported version is 0.5.0. Please update the version of the dependency ‘com.android.tools.build:gradle’
How do I do that? I can’t find any update tools for the gradle plugin in android studio.
14 Answers 14
Step 1 (Use default gradle wrapper)
File → Settings → Build, Execution, Deployment → Build Tools→Gradle → Use default Gradle wrapper (recommended)
Changing to Gradle Wrapper in the new version of Android Studio:
Step 2 (Select desired gradle version)
File → Project Structure → Project
The following table shows compatibility between Android plugin for Gradle and Gradle:
Latest stable versions you can use with Android Studio 4.1.2 (March 2021):
Official links
This may not be the exact answer for the OP, but is the answer to the Title of the question: How to Update Gradle in Android Studio (AS):
- Get latest version supported by AS: http://www.gradle.org/downloads (Currently 1.9, 1.10 is NOT supported by AS yet)
- Install: Unzip to anywhere like near where AS is installed: C:\Users[username]\gradle-1.9\
- Open AS: File->Settings->Gradle->Service directory path: (Change to folder you set above) ->Click ok. Status on bottom should indicate it’s busy & error should be fixed. Might have to restart AS
after release of android studio v 3.0(stable), It will show popup, If gradle update is available
Manually, just change version of gradle in top-level(project-level) build.gradle file to latest,
check below chart
(you might need to search for it). Save the file and open the project again.
Open File > Project Structure > Project Tab
Android Studio has built in project structure menu to check and update gradle and plugin used in the current project.
Below Website gives a detailed explanation on how to update gradle and gradle plugin of Android Studio.
For those who still have this problem (for example to switch from 2.8.0 to 2.10.0), move to the file gradle-wrapper.properties and set distributionUrl like that.
I changed 2.8.0 to 2.10.0 and don’t forget to Sync after
On Mac, open terminal and run the following commands as per instructions:
Once the installation is complete, the terminal would ask whether to set it as a default version so type y and make it the default version.
Now open Android Studio -> Terminal and run the following command
/.bash_profile to make the sdk executable if it’s not already in your path
Open your root build.gradle file and change Gradle version like this
For Gradle version compatibility see this.
I can’t comment yet.
Same as Kevin but with different UI step:
This may not be the exact answer for the OP, but is the answer to the Title of the question: How to Update Gradle in Android Studio (AS):
Источник
How to check the gradle version in Android Studio?
When compiling this official project with Android Studio 0.82, it shows error note:
After some searching, I decide to manually change content in the build.gradle file in line
to the gradle version that is installed in Android Studio.
The question is, can how to check the gradle version in my Android Studio?
6 Answers 6
File->Project Structure->Project pane->»Android plugin version».
Make sure you don’t confuse the Gradle version with the Android plugin version. The former is the build system itself, the latter is the plugin to the build system that knows how to build Android projects
Image shown below. I’m only typing this because of a 30 character minimum imposed by Stackoverflow.
I’m not sure if this is what you ask, but you can check gradle version of your project here in android studio:
(left pane must be in project view, not android for this path) app->gradle->wrapper->gradle-wrapper.properties
it has a line like this, indicating the gradle version:
There is also a table at the end of this page that shows gradle and gradle plug-in versions supported by each android studio version. (you can check your android studio by checking help->about as you may already know)
Источник