2.2.3
2.3.3
The previous migration guide states that all I need is
Make sure you use the Android Gradle 2.2 or later pluginRemove android-apt plugin from build scriptsChange all dependencies of apt, androidTestApt and testApt to their new format.
This should be all that is needed to successfully create a project. However, it is not built.
Gradle built with error (s) and 23 warnings (s) in 12 with 481 ms
All errors follow the same pattern:
C: \ Users ... \ FooAdapter.javaError: package com.example.app.databindingdoes not existerror: cannot find character class ItemFooBinding
com.example.app.databinding
ItemFooBinding
An interesting message can be found in the assembly console:
. - : "[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] '
, ...
, Gradle:
build.gradle
app/build.gradle
, " " , :
- , ? !
, , Kotlin. : Java, - . .:)
, apt annotationProcessor , .
apt
annotationProcessor
annotationProcessor, kapt, , -, Kotlin.
kapt
Gradle, , build.gradle:
annotationProcessor 'com.example.my.library:x.y.z
kapt 'com.example.my.library:x.y.z
. gradle :
kapt "com.android.databinding:compiler:3.0.1"
, -
Update:3.0.1 Android Plugin.
3.0.1
, , , - . . - , . , . , , , . , , , , Google .
100 - , , .
, Dagger 2 , annotationProcessor; . , , , - , .