Sloaix / Apollo

🚀 Awesome EventBus by RxJava.
https://lsxiao.github.io/Apollo/
Apache License 2.0
332 stars 36 forks source link

Unresolved reference: ApolloBinderGeneratorImpl #13

Closed xdk78 closed 7 years ago

xdk78 commented 7 years ago

Im using Kotlin and I have problem ApolloBinderGeneratorImpl.instance() does not exist. What im doing wrong?

//class App: Application() {

override fun onCreate() {
        super.onCreate()
        Apollo.init(AndroidSchedulers.mainThread(), ApolloBinderGeneratorImpl.instance(), this)
}

my gradle file:

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

...

//event bus
    implementation "com.github.lsxiao.Apollo:core:1.0.0-rc.4"
    implementation "com.github.lsxiao.Apollo:ipc:1.0.0-rc.4"
    kapt "com.github.lsxiao.Apollo:processor:1.0.0-rc.4"

    implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
    implementation "io.reactivex.rxjava2:rxjava:2.1.1"
    implementation "io.reactivex.rxjava2:rxkotlin:2.1.0"
Sloaix commented 7 years ago

ApolloBinderGeneratorImpl is generated by compile time annotation processor.

make sure your activity or fragment at least have one @Recevie annotation in your code,or ApolloBinderGeneratorImpl won't be generated.

see below: image

I will optimize it to let it easy to use next verison.

xdk78 commented 7 years ago

ok thanks