我試圖使用SwipeLayout庫從GitHub但我得到這個錯誤:搖籃工程同步使用從GitHub
Failed to resolve: com.daimajia.swipelayout:library:1.2.0
我什麼都試過,包括:
- 刪除
@aar
- 搜索並添加庫從
ProjectStructure -> app -> Dependencies
等..
第一我雖然也許問題是這樣的庫,但我試圖用this one但仍然收到這個錯誤..如果任何人都可以給我一個線索,我會如此感激。 和u能解釋什麼是compile '
和compile "
我試圖區別兩個
*這是我*`的build.gradle」文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.drgnme.listhamrah"
minSdkVersion 23
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
compile 'com.android.support:cardview-v7:26.0.0-alpha1'
compile 'com.android.support:design:26.0.0-alpha1'
compile 'com.github.roojin:persian-calendar-view:1.2.1'
compile 'com.android.support:support-v4:26.0.0-alpha1'
compile "com.daimajia.swipelayout:library:[email protected]"
}
發佈你的gradle文件。 – Abhi
確保您有良好的互聯網連接以下載該庫所需的所有文件。在某些情況下,如果端口未打開,android studio將無法同步導入的庫。我試着用你提到的庫,它對我來說工作正常..! – gStephin
@stephingeorge真的爲你工作嗎?是的,我做了你所說的,我甚至嘗試這樣做:'無效緩存/重新啓動',但仍然失敗:(( –