Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

123
Vistas
Compile avoidance in multi module android application with databinding

As stated in various articles (example: Jetbrains blog) and official documentation, in order to speed up android app builds it is recommended to enable compile avoidance. In order to do so the following parameters have to be added to gradle.properties:

# positive value will enable caching
# use the same value as the number of modules that use kapt
kapt.classloaders.cache.size=5

# disable for caching to work
kapt.include.compile.classpath=false

And that is what I did. But if both of these parameters are in gradle.properties, then one of the modules with databinding randomly fails to compile stating that DataBindingImpl classes are missing. If I remove at least one of mentioned parameters - everything compiles without any issues.

Since I am cleaning all of the project and then rebuilding it - compile avoidance should be skipped, because theoretically all of the file contents are changed.

Is there something with databinding and compilation avoidance that is incompatible? I can't seem to find any information about this. Why with these flags DataBindingImpl classes stop generating?

Entire gradle.properties content:

org.gradle.jvmargs=-Xmx2048m -XX:+UseParallelGC -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 
org.gradle.parallel=true
android.useAndroidX=true
android.enableJetifier=true
org.gradle.daemon=true
org.gradle.caching=true
kapt.incremental.apt=true
kapt.classloaders.cache.size=8
kapt.include.compile.classpath=false
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You can add the following code in gradle.properties file to avoid getting errors for data binding

kapt.classloaders.cache.disableForProcessors=android.databinding.annotationprocessor.ProcessDataBinding
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda