Software⏱️ 3 min read📅 2026-06-04

How to Fix: android: data binding error: cannot find symbol class

Learn how to fix: android: data binding error: cannot find symbol class.

Quick Answer: Try checking your system settings or restarting.

The 'cannot find symbol class ContactListActivityBinding' error occurs when the Android Data Binding feature is not properly configured in your project. This error affects developers who are using or planning to use Data Binding for their Android applications.

This error can be frustrating because it prevents you from utilizing the benefits of Data Binding, such as simplified data binding and improved code readability. However, with a thorough troubleshooting process, you should be able to resolve this issue efficiently.

💡 Why You Are Getting This Error

  • The primary cause of this error is that the Android Data Binding feature requires the 'dataBinding' property to be set to true in the app-level build.gradle file. If this property is not enabled, the compiler will throw a 'cannot find symbol class ContactListActivityBinding' error.
  • Another possible reason for this error could be that the layout file associated with the binding class (e.g., ContactListActivityBinding) does not exist or has been deleted.

🛠️ Step-by-Step Verified Fixes

Enabling Data Binding in app-level build.gradle

  1. Step 1: Open the app-level build.gradle file and navigate to the 'android' section.
  2. Step 2: Add the following line of code inside the 'buildTypes' block: dataBinding = true.
  3. Step 3: Save the changes and rebuild your project. This should resolve the 'cannot find symbol class ContactListActivityBinding' error.

Checking layout file existence

  1. Step 1: Verify that the layout file associated with the binding class (e.g., ContactListActivityBinding) exists and has not been deleted.
  2. Step 2: If the layout file does not exist, create a new one or recreate the existing one. Ensure that it is correctly named and located in the correct directory.

💡 Conclusion

By following these steps, you should be able to resolve the 'cannot find symbol class ContactListActivityBinding' error and successfully integrate Data Binding into your Android application. If you encounter any further issues, consider seeking additional assistance or consulting the official Android documentation for more information.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions