diff --git a/docs/html/tools/data-binding/guide.jd b/docs/html/tools/data-binding/guide.jd index bb5e092ba5642..7d20b6afcf8a1 100644 --- a/docs/html/tools/data-binding/guide.jd +++ b/docs/html/tools/data-binding/guide.jd @@ -145,7 +145,7 @@ page.tags="databinding", "layouts" — it's a support library, so you can use it with all Android platform versions back to Android 2.1 (API level 7+).
-To use data binding, Android Plugin for Gradle 1.3.0-beta4 +
To use data binding, Android Plugin for Gradle 1.5.0-alpha1 or higher is required.
To get started with Data Binding, download the library from the Support repository in the Android SDK manager.
-The Data Binding plugin requires Android Plugin for Gradle 1.3.0-beta4
-or higher, so update your build dependencies (in the top-level
-build.gradle file) as needed.
+To configure your app to use data binding, add the dataBinding element to your
+top-level build.gradle file with the following configuration:
+android {
+ ....
+ dataBinding {
+ enabled = true
+ }
+}
+
Also, make sure you are using a compatible version of Android Studio. Android Studio 1.3 adds the code-completion and layout-preview support for data binding.
-- Setting Up Work Environment: -
- -
- To set up your application to use data binding, add data binding to the class
- path of your top-level build.gradle file, right below "android".
-
- dependencies {
- classpath "com.android.tools.build:gradle:1.3.0-beta4"
- classpath "com.android.databinding:dataBinder:1.0-rc1"
- }
-
-
- Then make sure jcenter is in the repositories list for your projects in the top-level
- build.gradle file.
-
-allprojects {
- repositories {
- jcenter()
- }
-}
-
-- In each module you want to use data binding, apply the plugin right after - android plugin -
- --apply plugin: 'com.android.application' -apply plugin: 'com.android.databinding' --
- The data binding plugin is going to add necessary provided - and compile configuration dependencies to your project. -
-