2016-11-10 161 views
1

我嘗試添加以下依賴無法解析依賴

compile 'com.github.HugoMatilla:AudioPlayerView:v1.0.1' 

但得到以下錯誤

Error:(28, 13) Failed to resolve: com.github.HugoMatilla:AudioPlayerView:v1.0.1 Show in File
Show in Project Structure dialog

https://github.com/HugoMatilla/AudioPlayerView

任何一個可以幫助我如何解決這個問題

+0

你看了README? https://github.com/HugoMatilla/AudioPlayerView#include –

+0

@ cricket_007.ya我已閱讀 – iCoders

+0

請顯示您的Gradle文件,然後(如果下面的答案沒有解決) –

回答

2
allprojects { 
    repositories { 
     ... 
     maven { url "https://jitpack.io" } 
    } 
} 

編輯:

上面代碼放在build.gradle (Project: whatevername)

compile:'whatever' 

上面代碼放在build.gradle (Module:app)

+0

@ Ger.Thanks.you的意思是我必須在mbuild.gradle(Project:whatevername)中添加maven – iCoders

+0

url是,但'編譯:無論'模塊之一 –

+0

@ Germax.Thanks今天我會嘗試 – iCoders