Error:Could not run build action using Gradle installation (gradle 2.4 ,android studio)(错误:无法使用 Gradle 安装运行构建操作(gradle 2.4,android studio))
问题描述
我刚刚更新了 Android Studio,无法构建任何项目,甚至是新创建的项目.
I just update Android Studio and I can't build any project, even newly created ones.
我得到的错误是:
错误:无法使用 Gradle 分发运行构建操作https://services.gradle.org/distributions/gradle-2.4.zip'.
Error:Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.4.zip'.
我该怎么办?
推荐答案
我们有两个著名的方法来解决这个问题:
We have two famous way for this problem:
1- 更新 gradle:
第 1 步:
从以下位置获取 Android Studio 支持的最新版本:
Get latest version supported by Android Studio from:
https://services.gradle.org/distributions
第 2 步:
解压 gradle 文件并安装到 dists 文件夹(gradle 文件夹):默认位置是:C:Users[username]gradlewrapperdists
Extract the gradle file and install to dists folder(gradle folder): default location is: C:Users[username]gradlewrapperdists
第三步:
打开 Android Studio:File/Settings/Gradle/Service 目录路径:(更改为上面设置的文件夹)并点击确定.
Open Android Studio: File/Settings/Gradle/Service directory path: (Change to folder you set above) and Click ok.
底部的状态应该表明它很忙&错误应该被修复.
Status on bottom should indicate it's busy & error should be fixed.
第四步:
重启 Android Studio
restart Android Studio
2- 删除 .gradle 文件夹:
默认位置是:
C:Users[用户名]gradlewrapperdists
C:Users[username]gradlewrapperdists
之后打开 Android Studio 并创建一个新项目(可能需要重新启动).
after that open Android Studio and make a new project (might need to reastart).
这篇关于错误:无法使用 Gradle 安装运行构建操作(gradle 2.4,android studio)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:错误:无法使用 Gradle 安装运行构建操作(gradle 2.
基础教程推荐
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
