Failed to resolve: com.xwray:groupie:2.9.0

Viewed 862

I want to add groupie dependency but it gives me the following error after syncing.

enter image description here

And when I try to run my program it gives me this error. enter image description here

these are my dependencies in build.gradle file:

// groupie for managing complex recycler view adapter
implementation 'com.xwray:groupie:2.9.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.afollestad.material-dialogs:core:0.9.4.5'
2 Answers

Inside build gradle[project] Make sure you add jcenter()

buildscript {
      repositories{
            jcenter()
       }
}
allprojects {
      repositories{
            jcenter()
       }
}

If it's added you can try out earlier version

In case you used the solution provided by @Ananiya above and added the dependencies to project build, and are still getting error, remove the

allprojects {
  repositories{
        jcenter()
   }
}

block from project level gradle and add the jcenter() dependency inside the repositories block in settings.gradle, this is because RepositoryHandler is preferably managed by settings.gradle

Related