A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution

前端 未结 30 1804
南旧
南旧 2020-12-12 20:01

All of sudden I start getting this error, and I am not getting idea why if anyone just let me know where this error is, will be enough helpful. As much I am able to get is t

30条回答
  •  [愿得一人]
    2020-12-12 20:25

    In My Case: Issue resolved

    Steps:

    1. Remove viewModel variable - In XML.
    
    
    1. Removed all viewModel binding references - In XML.
    android:text="@{viewModel.simName}"
    
    1. Removed viewModel instance reference to the binding mapping - In Activity
    binding.viewModel = viewModel
    
    1. Clean project and recompile.

    2. Add viewModel variable - In XML & Build project.

    < variable
        name="viewModel"
        type="com.xx.AppViewModel" / >
    
    1. Add viewModel instance reference to the binding mapping - In Activity & Build project
    binding.viewModel = viewModel
    
    1. Add all viewModel binding references - In XML & Build project..
        android:text="@{viewModel.simName}"
    
    1. It will work now.

    -- I hope it will work for you also.

提交回复
热议问题