Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not recognized by any processor

I get the error when I try to build my project:

Warning:The following options were not recognized by any processor: '[android.databinding.minApi, android.databinding.enableDebugLogs, android.databinding.sdkDir, android.databinding.bindingBuildFolder, android.databinding.enableForTests, android.databinding.modulePackage, android.databinding.generationalFileOutDir, android.databinding.xmlOutDir, android.databinding.artifactType, android.databinding.printEncodedErrors, android.databinding.isTestVariant]'

I have no idea what could be reason of this problem. Here my gradle files:

build.gradle (Project)

buildscript {
    ext.kotlin_version = '1.1.1'
    apply from: 'scripts/dependencies.gradle'
    apply from: 'scripts/testDependencies.gradle'
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.1'
        classpath 'me.tatarka:gradle-retrolambda:3.6.0'
        classpath "io.realm:realm-gradle-plugin:2.3.1"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

build.gradle (app)

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.21.6'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
    maven { url "https://jitpack.io" }
    mavenCentral()
}

apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'realm-android'


android {
    compileSdkVersion 25
    buildToolsVersion '25.0.2'
    defaultConfig {
        applicationId "com.web2print"
        minSdkVersion 17
        targetSdkVersion 25
        versionCode 32
        versionName "1.0.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        vectorDrawables {
            useSupportLibrary = true
        }
    }

    signingConfigs {
        web2print {
            storeFile mainKeystore
            storePassword mainKeystorePassword
        }
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules/main.pro'
            signingConfig signingConfigs.web2print
        }

        debug {
            jackOptions {
                enabled false
                testCoverageEnabled = false
            }
        }
    }

    dataBinding {
        enabled true
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

android.applicationVariants.all { variant ->
    def variants = variant.baseName.split("-")
    def apkName = variants[0] + "-v" + variant.mergedFlavor.versionName
    apkName += "-build$variant.mergedFlavor.versionCode-"
    if (variant.buildType.name == "release") {
        apkName += "-release.apk"
    } else {
        apkName += "-debug.apk"
    }
    def output = variant.outputs.get(0)
    output.outputFile = new File(output.outputFile.parent, apkName)
}

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 dep.support.appCompat
    compile dep.support.cardView
    compile dep.support.recyclerView
    compile dep.support.design

    testCompile 'junit:junit:4.12'

    compile 'com.annimon:stream:1.1.7'
    compile 'io.reactivex:rxjava:1.1.0'
    compile 'io.reactivex:rxandroid:1.2.1'
    compile 'com.artemzin.rxjava:proguard-rules:1.1.0.0'
    compile 'com.tbruyelle.rxpermissions:rxpermissions:0.7.0@aar'

    compile 'com.github.bumptech.glide:glide:3.7.0'

    compile 'com.squareup.retrofit2:retrofit:2.1.0'
    compile 'com.squareup.retrofit2:converter-gson:2.1.0'
    compile 'com.squareup.retrofit2:converter-scalars:2.1.0'
    compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'

    compile 'com.badoo.mobile:android-weak-handler:1.1'

    compile 'com.squareup.okhttp3:okhttp:3.4.1'
    compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'

    compile 'com.github.rahatarmanahmed:circularprogressview:2.5.0'

    compile 'org.parceler:parceler-api:1.1.5'
    annotationProcessor 'org.parceler:parceler:1.1.5'
    compile('com.crashlytics.sdk.android:crashlytics:2.6.2@aar') {
        transitive = true;
    }

    compile 'uk.co.chrisjenx:calligraphy:2.2.0'
    compile 'com.github.nguyenhoanglam:ImagePicker:1.1.3'

    compile dep.moxy.lib
    compile dep.moxy.android
    compile dep.moxy.appCompat
    annotationProcessor dep.moxy.apt

    compile dep.timber

    compile 'me.grantland:autofittextview:0.2.1'

    provided 'org.projectlombok:lombok:1.16.12'
    annotationProcessor 'org.projectlombok:lombok:1.16.12'

    compile 'com.google.dagger:dagger:2.10'
    annotationProcessor 'com.google.dagger:dagger-compiler:2.10'
    compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
}

gradle-wrapper.properties

#Mon Jan 30 13:25:09 YEKT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4-all.zip

Please help me to find out a problem

like image 949
P. Ilyin Avatar asked Apr 08 '17 17:04

P. Ilyin


1 Answers

This answer by kristyna solved the issue for me. https://stackoverflow.com/a/48281160/3708094

I had to add the following line to the build.gradle file of my app

kapt "com.android.databinding:compiler:3.0.1"

This line makes sure the Kotlin Annotation Processer knows how to correctly deal with databinding

like image 79
RWIL Avatar answered Nov 09 '22 08:11

RWIL