Databinding Redirection To Xml Is Not Working In Android Studio 3.1.2
I have updated android studio to latest version(3.1.2) and now when I click on BindingClass with ctrl it's not opening xml file for it which was working in previous version. And I
Solution 1:
For opening related XML
Android Studio has a new icon for related XML redirection. My AS version is 3.2.1.
An hack for opening Binding Class.
- Ctrl + N (Open File)
- Type
ActivityMainBinding
{or first letters -Amb for ActivityMainBinding
if you are smart enough :) - Hit enter on
ActivityMainBinding
FYI I faced this problem in Java class only, [Go to declaration] works well with kotlin.
Solution 2:
add below code into the project level gradle file.
jcenter()
below gradle file in the project it working fine.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'// NOTE: Do not place your application dependencies here; they belong// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Post a Comment for "Databinding Redirection To Xml Is Not Working In Android Studio 3.1.2"