此错误仅发生在 android studio 3.5 中。我不知道为什么,因为我在我的其他项目中使用了相同的库,但是在升级到最新的 3.5 android studio 之后,我遇到了这个问题。我已经检查并尝试了一些答案,但无法解决。
错误:
ERROR: Failed to resolve: com.github.hatamiarash7:RTL-Toast:1.3
Show in Project Structure dialog
Affected Modules: app
图书馆:
implementation 'com.github.hatamiarash7:RTL-Toast:1.3'
我的应用依赖项部分:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.android.support:appcompat-v7:28.+'
implementation 'com.android.support:design:28.+'
implementation 'com.android.support:cardview-v7:28.+'
implementation 'com.android.support:recyclerview-v7:28.+'
// circle image view
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.github.hatamiarash7:RTL-Toast:1.3'
implementation 'androidx.appcompat:appcompat:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
最佳答案
您必须定义 JitPack在你的根 build.gradle
中:
allprojects {
repositories {
...
maven {
url 'https://jitpack.io'
}
}
}
并且您将使用此依赖项:
implementation 'com.github.hatamiarash7:RTL-Toast:1.3'
关于android - 错误 : Failed to resolve: com. github.hatamiarash7 :RTL-Toast:1. 3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57729870/