greenrobot / EventBus

Event bus for Android and Java that simplifies communication between Activities, Fragments, Threads, Services, etc. Less code, better quality.
http://greenrobot.org/eventbus/
Apache License 2.0
24.67k stars 4.66k forks source link

Could not resolve org.greenrobot:eventbus:3.3.1. #701

Closed 582527512 closed 2 years ago

582527512 commented 2 years ago

It's ok before then. After update gradle version to 7.4.2 , there got these question "Could not resolve org.greenrobot:eventbus:3.3.1." "Possible solution:

greenrobot-team commented 2 years ago

EventBus is available on Maven Central, as noted in the README. If you have Maven Central added to the repository section of your project it should be found:

repositories {
    mavenCentral()
}
HJHL commented 2 years ago

Check settings.gradle file in your project,

dependencyResolutionManagement {
  repositories {
    // check if it exists, add it if not
    mavenCentral()
  }
}
greenrobot-team commented 2 years ago

@HJHL Thanks! This is the new way to declare repositories globally in Gradle: https://docs.gradle.org/current/userguide/dependency_management.html#sub:centralized-repository-declaration