Android Studio 3.6 Canary 11 is now available in the Canary and Dev channels.
If you have Android Studio set to receive updates on the Canary or Dev channel, you can get the update by choosing Help > Check for Updates (Android Studio > Check for Updates on macOS). Otherwise, you can download it here.
View Binding
View binding is a new feature that provides compile-time safety when referencing views in your code. You can now replacefindViewById()
with the auto-generated binding class reference.
For example,
activity.xml -> ActivityBinding.java
.
To take advantage of View binding in a module of your project, add the following line to its
build.gradle
file:
android { viewBinding.enabled = true }To learn more, check out the documentation. If you have any feedback or encounter any issues, please report a bug.
General fixes
This update includes fixes for the following public issues:Build
- Issue #139769925: Gradle composite build causes stack overflow in included build
- Issue #136242040: Spaces ignored in links to file paths
- Issue #138131992: Error link do not set editor to correct line and column anymore, only to upper left (1,1)
- Issue #140509347: PsiModelMethod NPE: var parameterType = getParameter(i, parameterTypes)!! #task
- Issue #137047493: Track view binding layout numbers
- Issue #139933333: Unresolved binding fields in nested controls
- Issue #137878819: RoomSql Fragment Editor doesn't resolve symbols as the raw files do (triple quotes)
- Issue #124656558: com.intellij.util.IncorrectOperationException in Alt-Enter
- Issue #139821728: When add ‘android.enableSeparateAnnotationProcessing=true’, processDebugAnnotationsWithJavac task cannot be created
- Issue #139464147: Update to Gradle 5.6
- Issue #139696602: Links to re-run sync don't terminate the resulting sync correctly
- Issue #133342563: Exception when checking whether upgrade is possible
- Issue #133226746: Lint warning for textAlignment with minSdkVersion of 16
- Issue #139566120: Lint check showing incorrect warning with TypedArray recycle call
- Issue #136389141: buildTypes.each caused an error in project's structure suggestion
- Issue #139350627: Data binding: Cannot find identifier when referencing views in XML
- Issue #131991567: AS prompt generates gradle proxy data exception
- Issue #139411389: Type mismatch when an
tag has an id
We greatly appreciate your bug reports, which help us to make Android Studio better. If you encounter a problem, let us know by reporting a bug. Note that you can also vote for an existing issue to indicate that you are also affected by it.