1. 程式人生 > >Android Studio 3.0.1 gradle編譯報錯 Error : unable to resolve dependency for

Android Studio 3.0.1 gradle編譯報錯 Error : unable to resolve dependency for 阿新 發佈:2019-01-12

在app目錄下build.gradle中引用了第三方類庫,gradle編譯時不斷報錯,無法resolve第三方類庫,或者無法download第三方類庫

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' implementation 'io.reactivex.rxjava2:rxjava:2.1.14' implementation 'com.squareup.retrofit2:retrofit:2.4.0' implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.4.0' implementation 'com.squareup.okhttp3:okhttp:3.10.0' }

上網查詢可能是網路原因,解決辦法如下:

1. 檢查網路連線是否正常,正常繼續往下執行步驟2

2.關閉所有Android Studio專案並且重啟Android Studio

3.重新開啟剛才gradle編譯出錯的專案然後重新編譯gradle,編譯通過,解決該問題

相關推薦

Android Studio 3.0.1 gradle編譯 Error : unable to resolve dependency for <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a0c1

在app目錄下build.gradle中引用了第三方類庫,gradle編譯時不斷報錯,無法resolve第三方類庫,或者無法download第三方類庫dependencies { implementation fileTree(include: ['*.jar'],

Android StudioUnable to resolve dependency for ':<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="721302023200171e">[email&#

Android Studio報錯Unable to resolve dependency for’:[email protected]/compileClasspath’:無法引用任何外部依賴的解決辦法 Android Studio 在引用外部依賴時

android studio更新3.2遇到的坑,unable to resolve dependency for <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5a3b2a2a1a7474747474

距離第一次寫部落格轉眼一週多了,為什麼一直沒寫,真的這個過程中遇到了一些棘手的小麻煩 android studio更新3.2遇到的坑 4天前手賤更新了studio,然後新建工程就一堆報錯,照著網上的很多類似的部落格進行了處理,總結了一下無非以下幾種 1、降低依

gradle升到4.4後,Unable to resolve dependency for ':<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1d7c6d6d5d79787f687a">[email

Android studio可以升級到3.1了,預設用的是gradle4.4修改為distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zipbuildscript { re

android.view.WindowManager$BadTokenException: Unable to add window -- token <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2

android.view.WindowManager$BadTokenException: Unable to add window – token [email protected] is

android手機高精度定時機制--higher timer tick 筆記版 轉載請註明出處--- <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4b2839243838202e39252

作者   [email protected] 沒想到這篇隨意記錄的筆記成為老夫部落格裡閱讀量最多的。看來這的確是兄弟們關注較多的地方,待老夫抽時間把這個部分重新整理下,寫一個從核心到應用API的更新吧。 這裡簡單說一下android系統定時的原理。 首先,萬佛歸

Linux下$#,$0,$1,$2,$3,<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="bc98fc">[email protected]a>,$*,$$,$?代表的含義

$# :傳給指令碼的引數個數; $0 :指令碼名稱; $n :n為數字,代表傳給指令碼的第n個引數; [email protected] :引數列表; $* :也是顯示引數列表,與上一條命

升級 android studio Unable to resolve dependency for ':<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="026372724266676077

根據日誌裡顯示 http 127.0.0.1 。。。 總是無法build,確定是studio引入了本地的ip所以無法下載更新,於是在我們的studio中開啟System Settings 中的 Http Proxy看是否選擇的是 No proxy, 1 選擇了No proxy 如果是,就

[ 轉]Shell中引數($0,$1,$#,$NF,<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4b6f0b">[email protected]a>等)的含義

Shell中引數($0,$1,$#,$NF,[email protected]等)的含義         釋出時間:2018-01-19 來源:網路 上傳者:使用者  &nbs

WARN [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f9a88c968b8c94ba9781b49897989e9

這些日子為這個錯誤苦惱很久了,網上找到的各種方法都試了一遍,還是沒能解決。 安裝好zookeeper後,執行zkServer.sh start 顯示正常啟動,但執行zkServer.sh status 則顯示:Error contacting service. It is probably not runn

android Studio 出現:Unable to resolve dependency for ':<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4b2a3b3b0b2f2e293e2c

li經千辛萬苦,我的新工程gradle搞定了 但是卻在變異的時候告訴我 Unable to resolve dependency for ':[email protected]/compileClasspath'xxx 等等,導致我的所有的依賴都拿不下來 我去,這不是要我的命嗎 然後又是一

Android studio 下載依賴時出現Unable to resolve dependency for ':<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8feeffffcfebeaed

Android studio下載依賴時出現無法解析':app @ debug / compileClasspath'的依賴關係錯誤。 原因安裝Android studio時設定了代理或映象伺服器。  解決方法,在C盤中找到.gradle資料夾(一般都是C盤)如我的位置在用記事本開啟.g

淺談linux中shell變數$#,<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="674327">[email protected]a>,$0,$1,$2,$?的含義解釋

淺談linux中shell變數$#,[email protected],$0,$1,$2,$?的含義解釋 下面小編就為大家帶來一篇淺談linux中shell變數$#,[email protected],$0,$1,$2的含義解釋。小編覺得挺不錯的,現在就分享給大家,

shell 中的$0 $1 $* <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e5c1a5">[email protected]a> $# $$ $?

$0: 指令碼本身檔名稱 $1: 命令列第一個引數,$2為第二個,以此類推 $*: 所有引數列表 [email protected]: 所有引數列表 $#: 引數個數 $$: 指令碼執行時的PID $?: 指令碼退出碼 ∗與@的區別 當命令列為test.sh 1 2 3 "$*“表示"1

Android studio提交程式碼到<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b8ffd1ccf8f7ebfb">[email protected]a>

2,有Android studio開發環境 3,在OSC上建立專案 4,android studio建立本地專案,create git repository,選擇當前專案的根目錄: 5,以下為命令列操作:開啟本地的git bash命令列工具,cd進入專案資料夾位置,

解決zookeeper[NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="16585f594573646073645

zookeeper.out報錯: 2016-12-10 18:05:46,958 [myid:3] - WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:[email protected]] - Exceptio

shell腳本中的$# $0 <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f8dcb8">[email protected]a> $* $$ $! $?的意義

腳本 $* width 上一個 pre shell int .cn height 轉載自:http://www.cnblogs.com/davygeek/p/5670212.html 今天學寫腳本遇到一些變量不認識,在此做下記錄。 變量 含義 $0 當前腳本的文件

Spring4.0系列<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="aa9f87eae9c5c4cec3dec3c5c4cbc6">[email protected]a>

one window 標識 cto ace ted ada bsp 布爾 這篇文章介紹Spring 4的@Conditional註解。在Spring的早期版本你可以通過以下方法來處理條件問題: 3.1之前的版本,使用Spring Expression Langua

linux bash Shell特殊變數:Shell $0, $#, $*, <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8aaeca">[email protected]a>, $?

在linux下配置shell引數說明 前面已經講到,變數名只能包含數字、字母和下劃線,因為某些包含其他字元的變數有特殊含義,這樣的變數被稱為特殊變數。  例如,$ 表示當前Shell程序的ID,即pid,看下面的程式碼: [[email protected] /]$ ec