I am learning android data binding in android. As per the tutorials available in the sites, I used below code (as per this site : https://www.androidauthority.com/data-binding-in-android-709747/) in build.gradle file android { compileSdkVersion 24 buildToolsVersion "24.0.0" dataBinding.enabled = true }
As I wrote this code in build.gradle file and hyperlink appeared in android studio sync now. Screenshot below. build.gradle screenshot
I clicked in the sync now hyperlink and it showed error in event log. Below is the error.
Gradle sync failed: Could not find method android() for arguments [build_a9l2u6i44dsxt8c6i2t9xn8sf$_run_closure1@44f18ebf] on root project 'TestDataBinding' of type org.gradle.api.Project. Consult IDE log for more details (Help | Show Log)
Please advice how to deal with this error and learn data binding in android.
I am using android studio 2.3.3