android - 错误 : Failed to resolve: com. github.hatamiarash7 :RTL-Toast:1. 3

标签 android android-studio android-library android-toast

此错误仅发生在 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/

相关文章:

Android:在 Android 中为应用程序离线存储 JSON 数据的最佳方式是什么?

id 为 : 'kotlin-android-extensions' 的 android studio 插件

java - onDraw() 或dispatchDraw() 不会在触摸时被调用

android - Gradle 2.1 错误无法将提供的符号转换为文件或 URI [src/main/java, src]

android - 代码完成不适用于外部库 XML 属性 (Android Studio)

Java 处理程序如何在不发送 onUserInteraction 方法的情况下执行 Intent

android - 来电启动服务

android - 如何在android上获取应用程序使用统计信息?

java - 如何将保存的 .wav 文件读取为字节或 double 组?我正在使用 Java/Android Studio

android - 如何使用 proguard 混淆 android 库(.aar)?