Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

120
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!