Android 绑定类是否会自动生成?

Android 绑定类是否会自动生成?,android,data-binding,Android,Data Binding,我正在用谷歌数据绑定库开发一个应用程序。但是我发现每次我添加一个新的布局xml时,相应的绑定类都不会生成。我必须在androidstudio上点击build按钮,然后绑定类将生成 以下是我使用的依赖项 应用程序build.grade: apply plugin: 'com.android.application' apply plugin: 'com.android.databinding' apply plugin: 'com.neenbedankt.android-apt' apply pl

我正在用谷歌数据绑定库开发一个应用程序。但是我发现每次我添加一个新的布局xml时,相应的绑定类都不会生成。我必须在androidstudio上点击build按钮,然后绑定类将生成

以下是我使用的依赖项

应用程序build.grade:

apply plugin: 'com.android.application'
apply plugin: 'com.android.databinding'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'com.jakewharton.hugo'
apply plugin: 'com.fernandocejas.frodo'

android {
    signingConfigs {
    }
    compileSdkVersion 23
    buildToolsVersion '23.0.2'
    defaultConfig {
        applicationId "com.xinpinget.gamecube"
        minSdkVersion MIN_SDK_VERSION as int
        targetSdkVersion TARGET_SDK_VERSION as int
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    productFlavors {
        production {
            signingConfig signingConfigs.config
        }
        internal {
        }
    }
//    dexOptions {
//        incremental true
//    }
}

retrolambda {
    jdk "/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home"
    oldJdk System.getenv("JAVA_HOME")
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile project(':insta-filter-release')
    compile project(':library-debug')
    compile('com.facebook.fresco:fresco:0.7.0') {
        exclude module: 'support-v4'
    }
    provided 'com.squareup.dagger:dagger-compiler:1.2.2'
    //    apt ('com.squareup.dagger:dagger-compiler:1.2.2') {

    //    }
    compile('com.android.support:design:23.0.1') {
        exclude module: 'support-v4'
        exclude module: 'appcompat-v7'
    }
    compile('io.reactivex:rxandroid:1.0.1') {
        exclude module: 'rxjava'
    }
    compile('io.reactivex:rxjava-debug:1.0.2') {
        exclude module: 'rxjava'
    }
    compile('com.squareup.retrofit:adapter-rxjava:2.0.0-beta2') {
        exclude module: 'rxjava'
    }
    internalCompile 'com.squareup.retrofit:retrofit-mock:2.0.0-beta1'
    internalCompile 'com.squareup.retrofit:adapter-rxjava-mock:2.0.0-beta1'
    compile('com.squareup.retrofit:converter-gson:2.0.0-beta2') {
        exclude module: 'retrofit'
    }
    compile('com.umeng:fb:5.4.0') {
        /**
         *  If not exclude message module, gradle will throw a error when building.
         */
        exclude module: 'message'
        exclude module: 'support-v4'
    }
    compile 'com.android.support:appcompat-v7:23.1.0'
    compile 'com.github.bumptech.glide:glide:3.6.1'
    compile 'com.squareup:otto:1.3.8'
    compile 'com.jakewharton:butterknife:7.0.1'
    compile 'com.squareup.dagger:dagger:1.2.2'
    compile 'io.reactivex:rxjava:1.0.14'
    compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
    compile 'com.android.support:recyclerview-v7:23.1.0'
    compile 'com.android.support:support-v4:23.1.0'
    compile project(':ShareSDK_oneKeyShare')
    compile project(':sMSSDK')
    compile 'com.android.support:cardview-v7:23.1.0'
}
我解决了这个问题

这是由android-apt引起的。