我刚刚开始使用新的Android Jack compiler并使用Greenrobot Eventbus
我在一些反复试验之后才开始工作,但是当我在2个地方指定eventBusIndex
参数时它似乎才有效 - 请参阅下面的代码:
android {
defaultConfig {
javaCompileOptions {
annotationProcessorOptions {
// TODO: why must I specify eventBusIndex twice? --> also for each buildVariant
arguments = [
'eventBusIndex': "com.tmtron.dscontrol.EventBusIndex"
]
}
}
}
// this is a workaround to specify the Manifest for AndroidAnnotations
// see: https://code.google.com/p/android/issues/detail?id=210753
applicationVariants.all { variant ->
variant.variantData.variantConfiguration.javaCompileOptions.annotationProcessorOptions
.arguments = [
'eventBusIndex': "com.tmtron.dscontrol.EventBusIndex"
, 'androidManifestFile': variant.outputs[0]?.processResources?.manifestFile?.absolutePath
]
}
}