Buttknife 不适用于 RXJava

Buttknife not working with RXJava

两个库有问题。

Gradle 文件

apply plugin: 'com.android.application'
android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "pe.com.gmd.innova.adexus.adexusday"
        minSdkVersion 16
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        jackOptions {
            enabled true
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}
/*
greendao {
    schemaVersion 7
}*/
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile(name: 'androidgmd2', ext: 'aar')
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.jakewharton:butterknife:7.0.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support:cardview-v7:25.3.1'
    compile 'com.android.support:recyclerview-v7:25.3.1'
    compile 'com.android.support:multidex:1.0.1'
    compile 'org.greenrobot:greendao:3.2.2'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.daimajia.androidanimations:library:1.1.3@aar'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.squareup.retrofit2:retrofit:2.0.2'
    compile 'com.squareup.retrofit2:converter-gson:2.0.2'
    compile 'com.viewpagerindicator:library:2.4.1@aar'
    compile 'com.google.android.gms:play-services-location:10.2.1'
    compile 'com.google.android.gms:play-services-maps:10.2.1'
    compile 'com.google.firebase:firebase-messaging:10.0.1'
    compile 'com.google.firebase:firebase-crash:10.0.1'
    compile 'com.google.code.gson:gson:2.8.0'
    compile 'me.dm7.barcodescanner:zbar:1.9.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
    compile 'com.android.support:support-v4:25.3.1'
    testCompile 'junit:junit:4.12'
    compile 'io.reactivex:rxandroid:1.2.0'
    compile 'io.reactivex:rxjava:1.1.8'
    compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'

}
apply plugin: 'com.google.gms.google-services'

没有问题 gradle 处理任何错误..

所以射出应用程序有问题..因为我的 buttknife 不能射入。

可能存在这样的版本,可以很好地与 rxjava 库一起工作?或者版本真的很低

我的版本库compile 'com.jakewharton:butterknife:7.0.1'

您似乎没有导入 AnnotationProcessor。 尝试使用最新版本:

compile 'com.jakewharton:butterknife:8.6.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'