任何人都可以幫助解決這個問題嗎?不知道為什么它不能解決 2.0.1 但它是 1.4.3
無法解決:com.github.prolificinteractive:material-calendarview:2.0.1 受影響的模塊:app
build.grade(專案)檔案有:
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
build.gradle(Module) 檔案有:
dependencies {
implementation 'com.github.prolificinteractive:material-calendarview:2.0.1' <-"correct" per docs
// implementation 'com.prolificinteractive:material-calendarview:1.4.3' <-- works
// implementation 'com.prolificinteractive:material-calendarview:2.0.1' <-- does not work
// implementation 'com.github.prolificinteractive:material-calendarview:2.0.1' <-- does not work
// implementation 'com.github.prolificinteractive:material-calendarview:1.4.3' <-- does not work
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
還嘗試通過專案結構添加,但如果我搜索它找不到 com.github.prolificinteractive:material-calendarview 但如果我搜索 material-calendarview 我可以找到 1.4.3
謝謝
專案結構1
專案結構2
uj5u.com熱心網友回復:
如果這是一個新專案,可能你有 settings.gradle,那么你應該在那里添加它:
dependencyResolutionManagement {
repositories {
maven { url 'https://jitpack.io' }
}
}
您始終可以從 settings.gradle 中洗掉此代碼塊,并按照 github 存盤庫中的建議使用它。確保添加maven { url 'https://jitpack.io' }inside allprojects,而不僅僅是repositories塊。像這樣:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/415950.html
標籤:
