Boa Noite,
Tive o mesmo problema:
Solução é no gradle adicionar:
javaCompileOptions {
annotationProcessorOptions {
arguments = [ eventBusIndex : 'br.com.alura.agenda.event.MyEventBusIndex' ]
}
}
e tambem
annotationProcessor 'org.greenrobot:eventbus-annotation-processor:3.0.1'
Completo:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "br.com.alura.agenda"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
javaCompileOptions {
annotationProcessorOptions {
arguments = [ eventBusIndex : 'br.com.alura.agenda.event.MyEventBusIndex' ]
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
packagingOptions {
exclude("META-INF/LICENSE")
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:cardview-v7:24.0.0'
compile 'com.android.support:support-v4:24.0.0'
compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-jackson:2.3.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.9.0'
compile 'com.google.firebase:firebase-messaging:10.0.1'
compile 'org.greenrobot:eventbus-annotation-processor:3.0.1'
annotationProcessor 'org.greenrobot:eventbus-annotation-processor:3.0.1'
}
apply plugin: 'com.google.gms.google-services'
Encontrei a solução em http://greenrobot.org/eventbus/documentation/subscriber-index/