Search code examples
androidandroid-studioandroid-libraryandroid-toast

ERROR: Failed to resolve: com.github.hatamiarash7:RTL-Toast:1.3


This error only happening in android studio 3.5. I don't know why because I have used this same library in my other projects but after upgrading to the latest android studio which is 3.5, I am having this issue. I have checked and tried some answers but I was unable to solve it.

The error:

ERROR: Failed to resolve: com.github.hatamiarash7:RTL-Toast:1.3

Show in Project Structure dialog

Affected Modules: app

The library:

implementation 'com.github.hatamiarash7:RTL-Toast:1.3'

My apps dependencies section:

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'
}

Solution

  • You must define JitPack in your root build.gradle:

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

    and you will use this dependency:

    implementation 'com.github.hatamiarash7:RTL-Toast:1.3'