最近把Android studio升級到2.2 Preview7预鬓,發(fā)現(xiàn)在使用databinding的時候編譯不過去辱志,會出現(xiàn)下面錯誤。
錯誤圖片
測試后發(fā)現(xiàn)是因為項目gradle版本配置成了
dependencies {
classpath 'com.android.tools.build:gradle:+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
將其修改為1.5.0后問題解決
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
具體原因未知,以后友善在赋除。