2

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'
Meraj
  • 439
  • 3
  • 9

2 Answers2

1

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

Ananiya Jemberu
  • 1,366
  • 1
  • 9
  • 14
1

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

qualiky
  • 66
  • 3