# multiplatform

Lena Stepanova

05/28/2021, 3:09 PM
Hi everyone! I don't know if it has to do with KMM, but I can't build a multiplatfom project anymore, which was fine a month ago. I am using dataBinding in the android app and now getting Unresolved reference: generated and Unresolved reference: BR after
Copy code
> Task :androidApp:compileDebugKotlin FAILED
Does anyone know what's missing? There is also
Copy code
> Task :androidApp:kaptDebugKotlin
[WARN] Can't find annotation processor class android.databinding.annotationprocessor.ProcessDataBinding: javax/xml/bind/JAXBException
Also it builds and runs if I just Rebuild in AS. If I do ./gradlew clean build, then it fails Android build.gradle
Copy code
plugins {
version = "1.0"

repositories {

dependencies {
  implementation(kotlin("stdlib-jdk7", org.jetbrains.kotlin.config.KotlinCompilerVersion.VERSION))
  implementation (Deps.navigation_fragment)
  implementation (Deps.navigation_ui)
  implementation (Deps.drawer)

android {
  defaultConfig {
    applicationId = " "
    versionCode = 11
    versionName = "2.0"

  dataBinding {
    isEnabled = true

  packagingOptions {

  signingConfigs {
    create("release") {
      keyAlias = " "
      keyPassword = " "
      storeFile = file(" ")
      storePassword = " "

  buildTypes {
    getByName("release") {
      isMinifyEnabled = false
      proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "<|>")
      signingConfig = signingConfigs.getByName("release")

  compileOptions {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8

  kotlinOptions {
    jvmTarget = JavaVersion.VERSION_1_8.toString()

  lintOptions {
    isWarningsAsErrors = true
    isAbortOnError = true


05/28/2021, 6:35 PM
I guess you run it on jdk 9+


05/28/2021, 6:47 PM
Which AGP version are you on? Did you try running the clean task alone, then running the build task alone? Running clean and build in the same Gradle build/invocation can cause problems with some plugins I think.

Lena Stepanova

06/16/2021, 9:32 AM
Hi all, sorry fo a late reply. Yes, I tried running clean and build separately, as well as other options. But now I have resolved the problem and the reason seems to be outdated dependencies and
Copy code
dataBinding {
    isEnabled = true
Which had to be changed into
Copy code
buildFeatures {
    viewBinding = true
    dataBinding = true
I also replaced
Copy code
Copy code
Now after upgrading to kotlin 1.5.10, as well as upgrading Android Studio to Artic Fox (2020.3.1) Beta 3 everything works as it should