1. 程式人生 > >Error:Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-2

Error:Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-2

AS報錯之 Error:Could not install Gradle distribution from ‘https:/ /services.gradle.org/distributions/gradle-2.2.2-all.zip’.

解決方案

這個錯誤一般是匯入了網上的GitHub專案 或者別人的專案引起的。

以下是我個人的解決方法

字面意思也就是說 現在安裝不了 也找不到這個版本的Gradle!

先進到Gradle的設定頁面 Settings-Build, Execution, Deployment-Gradle

選擇用本地的Gradle外掛 並輸入路徑

D:/ASinstall/gradle/gradle-2.14.1

gradle

然後 出現了這個報錯

Error:(2, 0) No service of type Factory available in ProjectScopeServices.

這個錯誤點選open file 會跳轉到apply plugin: ‘com.github.dcendents.android-maven’這行。

這個你需要更新maven-plugin的依賴 將這兩行程式碼新增到dependencies{} 依賴 標籤內
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.android.tools.build:gradle:2.2.2'

這些依賴項 是為了將程式碼什麼的上傳至那個公共的jCenter上面

還要注意 專案-gradle-gradle-wrapper-wrapper.properties下的 distributionUrl= 是對的

最後 File-Invalidate Caches/Restars… 專案

拓展:

啥是Bintray?啥是jCenter?

首先說jCenter,是一個程式碼庫,相當於一個公共的儲存控制元件,簡單的來講就是你把你寫好的aar檔案及一些文件描述檔案之類的東西打包上傳到jCenter伺服器上,其他人就可以通過jCenter伺服器下載到你上傳的包了。
那Bintray又是啥?Bintray是jCenter的提供商,他支援上傳lib到多個平臺,jCenter只是眾多平臺中的一個,形象的說jCenter是位於某地的倉庫,Bintray是送貨的卡車,你寫的庫就是貨了

相關推薦

Error:Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-2

AS報錯之 Error:Could not install Gradle distribution from ‘https:/ /services.gradle.org/distributions/gradle-2.2.2-all.zip’. 解決方案

報錯 Error:Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradl

http://stackoverflow.com/questions/32887623/errorcould-not-run-build-action-using-gradle-installation-gradle-2-4-android  上面網址是網上的解決方案,貌似

[已解決]adb server version (31) doesn't match this client (36); killing... error: could not install *sm

執行adb 命令的時候報錯: C:\Users\Administrator>adb devices List of devices attachedadb server version (31)

Unable to create Debug Bridge: Unable to start adb server: error: could not install *smartsocket* li

Unable to create Debug Bridge: Unable to start adb server: error: could not install smartsocket listener: cannot bind to 127.0.0.1:

MAC OSX安裝pip出錯 error: Could not find suitable distribution for Requirement.parse('pip')

▶ sudo easy_install pip Password: Searching for pip Reading https://pypi.python.org/simple/pip/ Download error on https://pypi.python.

org.gradle.tooling.GradleConnectionException: Could not install Gradle distribution from

STS中Gradle依賴依賴無論如何也無法下載,build時報了個錯誤 首先刪除.gradle資料夾 試了下https://services.gradle.org/地址,果然不通,換了個地址

解決【Error:Could not run build action using Gradle distribution 】問題記錄

1.問題詳情:Error:Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.1-all.zip'.Consult I

Android Studio org.gradle.tooling.GradleConnectionException: Could not install Gradle distribution f

I've faced the same issue this morning after upgrading Android Studio to 2.3. To solve the issue: 2) Open your android studio root dir

安卓:Could not read cache value from'C:\Users\Username\.gradle\daemon\1.12\registry.bin'

android studio在載入專案的時候報錯: Error:Could not read cache value from'C:\Users\Username\.gradle\daemon\1.12\registry.bin' 參考stack overflow上的一個解決方法,刪除

Error:Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2). Searched i

今日寫程式碼時,更新完大佬的程式碼後,出現了一個錯誤,描述如下: Error:Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2). Searched in the following

ionic 提示 Error: Could not find gradle wrapper within Android SDK.

Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK. 到Android SDK目錄下,確認真沒有這個tools/templates/gradle 目錄 可能是And

error:Could not find gradle

一.更新Android Studio後開啟Project,報如下錯誤: Error: Could not find com.android.tools.build:gradle:2.2.1.  Searched in the following locations:&nb

ReactNative執行Could not install the app on the device, read the error above for details錯誤

Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected

RN開發(四:Could not install the app on the device, read the error above for details. Make sure you ...)

前言 手賤升級mac系統, 然後就報標題錯誤, 然後virtualBox 失效,重新安裝後,導致genymotion 開啟 react-native run-android 報上面錯誤, 一開始以為環境變數問題,去其他rn專案 沒這問題, 然後以為genymo

Gradle-Could not determine java version from '11'

問題描述 因為換工作,需要新配置的環境,所以遇到了各種問題,例如下面這個: 發生錯誤的相關環境配置 JDK 11 Gradle 4.4 如果不知道自己安裝的 Java 版本,可以根據一下命令檢視: Mac : #檢視版本 java -version #檢

Error:Could not download artifact 'com.android.tools.build:gradle:0.13.2:gradle.jar

這個錯誤是由於我們目前比較新的studio版本都把jcenter倉庫作為預設的library倉庫,但是呢標題這個異常表示的jar檔案不在我們的jcenter中,在另一個mavencenter倉庫中,所以

Could not install packages due to an Environment Error: [Errno 13] Permission denied 解決方案

執行pip install 報錯如下: Could not install packages due to an Environment Error: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/kiwisolv

Android Studio Error:Could not find com.android.tools.build:gradle

一、今天更新Android Studio後開啟Project,報如下錯誤: Error: Could not find com.android.tools.build:gradle:2.2.1. Searched in the following

npm ERR! code ENOLOCAL Could not install from "" as it does not contain a package.json file.解決

一、問題描述 使用npm安裝時出現以下問題, $ npm install -g npm ERR! code ENOLOCAL npm ERR! Could not install from "" as

Android Studio下“Error:Could not find com.android.tools.build:gradle:2.2.1”的解決方法

今天更新Android Studio後開啟Project,報如下錯誤: Error:Could not find com.android.tools.build:gradle:2.2.1. Searched in the following locations:    fi