1. 程式人生 > >Android Studio下“Error:Could not find com.android.tools.build:gradle:2.2.1”的解決方法

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:
    file:/D:/Program Files/Android/android-studio/gradle/m2repository/com/android/tools/build/gradle/2.2.1/gradle-2.2.1.pom
    file:/D:/Program Files/Android/android-studio/gradle/m2repository/com/android/tools/build/gradle/2.2.1/gradle-2.2.1.jar

https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.1/gradle-2.2.1.pom

後來嘗試後找到的解決方法為:

1、進入file:/D:/Program Files/Android/android-studio/gradle/m2repository/com/android/tools/build/gradle/,檢視當前已有內容如下


2、於是在build.gradle中做如下修改


3、sync後解決。

相關推薦

Android StudioError: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

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

導入項目的時候報錯Error:Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha7

原因 自己 進行 ack class rain 選擇 and clas 問題描述 今天在導入項目的時候報錯: Error:Could not find com.android.support.constraint:constraint-layout:1.0.0-alph

Error:Could not find com.android.support:appcompat-v7:25.3.1.

“` Error:Could not find com.android.support:appcompat-v7:25.3.1. Required by: cashking:app:unspecified cashking:app:unspecified > cashkin

android stdio Error Could not find com.android.tools common 25.2.2

Error:Could not find com.android.tools:common:25.2.2. Searched in the following locations: file:/D:/Program Files/Android/Android Studio/gradle/m2re

【AndroidStudio】Error:Could not find com.android.tools.build:gradle:2.3.3

Error:Could not find com.android.tools.build:gradle:2.3.3. Searched in the following locations: file:/D:/Software/AS3.0/gradle/m2repository/com/android/too

Android Studio專案編譯出錯could not find com.android.tools.buildgradle:2.2.2

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

Android sdk 更新後編譯不過,【Could not find com.android.sdklib.build.ApkBuilderMain】

jar andro 更新 文件 命名 back span color not 最近更新了Android sdk,發現編譯不過了 解決方案: 進入 sdk/tool/lib/ 目錄下,看看有沒有 sdklib.jar 這個文件,如果沒有看看有沒有sdklib-25.*.

Could not find com.android.tools.lint:lint-gradle:26.1.2.

tdi spa google andro jce -s repo jcenter android allprojects { repositories { flatDir { dirs ‘libs‘ }

Could not resolve all files for configuration ':classpath'.Could not find com.android.tools.

升級到Android Sutido 3.0後,跑測之前的Model的main()方法方法時報錯: Error:Gradle: A problem occurred configuring root project ‘MyApplication’. Could not reso

Android出現:Your project path contains non-ASCII characters報錯、Could not find com.android.support.報錯

        安卓在匯入或者建立專案時,專案名字是不可以含有中文的,只要有中文就會報錯,下面是本人在匯入android專案時由於忘記這個常識而犯的錯誤,還有就是另一個錯誤新增依賴時程式報的錯誤,現在利用網上的大牛們的部落格整合起來寫了這個部落格,用來以後提醒自己: 第一個

依賴ConstraintLayout報錯:Could not find com.android.support.constraint:constraint-layout:1.0.0-beta5

ConstraintLayout是Android Studio 2.2中主要的新增功能之一,方便開發者使用圖形化介面來完成UI佈局,減少佈局巢狀。更多的使用方法,可以參考這篇文章:ConstraintLayout完全解析 在進行佈局轉換時,我們需要新增依賴: compi

GradleCould not find com.android.tools.buildgradle3.0.0. Searched in the followi

Could not find com.android.tools.buildgradle3.0.0. Searched 解決辦法:這是因為在gradle中的repositories 缺少了 ‘goog

AndroidStudio編譯提示Could not find com.android.tools.lintlint-gradle26.1.3問題的解決

開啟app同事留下的project,此project用到library,編譯此module的時候提示Could not find com.android.tools.lintlint-gradle26.1.3 根據Android Studio文件,我們project的頂

Gradle sync failed: Could not find com.android.tools.build:gradle:2.3.3.

問題:Gradle編譯失敗 詳細錯誤訊息: Gradle sync failed: Could not find com.android.tools.build:gradle:2.3.3.           

Flutter新手第一個坑:Could not find com.android.tools.lint:lint-gradle:26.1.1.

解決方法1:修改build.gradle,註釋掉jcenter(),google()。使用阿里的映象。原因是jcenter google庫無法訪問到導致的問題。雖然我有萬能的爬牆工具,開啟全域性代理依然被我們偉大的發改委牆掉了! buildscript { repositories { //goo

Could not find com.android.tools.build:aapt2:3.2.0-4818971.

Could not find com.android.tools.build:aapt2:3.2.0-4818971. Searched in the following locations:     file:/G:/workspace/android/adt-bun

Could not resolve all files for configuration ':library:lintClassPath' Could not find com.android.to

gradle打包出現一下錯誤:* What went wrong:Could not resolve all files for configuration ':library:lintClassPat

could not find com.android.tools.build:gradle:2.2.3

將專案的 build.gradle中的 buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tool

Could not find com.android.tools.build:aapt2:3.2.1-4818971.

Could not find com.android.tools.build:aapt2:3.2.1-4818971. Searched in the following locations:     file:/H:/Android/android-sdk/extras/m2r