Skip to content
Advertisement

how to clean up generated data binding files?

I’ve got a problem

I created the activity and xml files in a git branch.

Commit these tasks, and change the branch to do something else.

However, when build app, the following error occurred.

/Users/xxxx/Desktop/product/product-app-android/app/build/generated/source/kapt/stgDebug/kr/co/product/product/databinding/ActivityDebugUserInfoBindingImpl.java:8: error: cannot find symbol

ActivityDebugUserInfo is the file I created in the previous branch.

There is no such file in the current branch. Nevertheless, it was created automatically

I repeated clean project and rebuild, invalid cache and restart. However, the problem was not solved.

The automatically generated file has been revived like a zombie.

Obviously, I think the file will be automatically generated based on some cache data.

But i don’t know what it is.

How can i refresh generated databinding file?

Advertisement

Answer

self answer.

In my case, after fixing the following code, the problem was solved.

To speed up the build I used the following code in gradle.properties:

org.gradle.daemon = true
org.gradle.parallel = true
org.gradle.configureondemond = true
org.gradle.caching = true

Because of this, clean did not work properly. After commenting the code, it worked.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement