Fixed
Status Update
Comments
da...@google.com <da...@google.com> #3
Yes, please. Can you paste the exact error? And can you paste the related code from the layout file?
mi...@gmail.com <mi...@gmail.com> #4
A simple test layout with class attribute for custom Binder name:
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android="http://schemas.android.com/apk/res/android "
>
<data class="Binder_TestFragment">
<import type="android.view.View"/>
<import type="com.taskx.android.model.Schedule"/>
<variable
name="model"
type="com.taskx.android.viewmodel.ScheduleViewModel"
/>
</data>
<View
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</layout>
Error appears in Editor ("Attribute class is not allowed here") for line 5. Also, red markers in Project panel.
No errors when compiling or building app.
Abstract class Binder_TestFragment (in app package) and concrete class Binder_TestFragmentImpl are generated without problems.
Not critical, but really distracting while developing large apps.
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android="
>
<data class="Binder_TestFragment">
<import type="android.view.View"/>
<import type="com.taskx.android.model.Schedule"/>
<variable
name="model"
type="com.taskx.android.viewmodel.ScheduleViewModel"
/>
</data>
<View
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</layout>
Error appears in Editor ("Attribute class is not allowed here") for line 5. Also, red markers in Project panel.
No errors when compiling or building app.
Abstract class Binder_TestFragment (in app package) and concrete class Binder_TestFragmentImpl are generated without problems.
Not critical, but really distracting while developing large apps.
da...@google.com <da...@google.com> #6
Yigit: Quick question...
According tohttps://developer.android.com/guide/topics/manifest/data-element there is no "class" attribute on the data tag, but according to the user who filed this bug, setting "class" actually does stuff. Can you clarify if this attribute should be supported by Studio or not? Thanks!
According to
mi...@gmail.com <mi...@gmail.com> #8
Indeed...
Link "https://developer.android.com/guide/topics/manifest/data-element " refers to the <data> element within the manifest file.
The <data> tag we are referring on this ticket is about Data Binding (for layout files) as Yigit specified (linkhttps://developer.android.com/topic/libraries/data-binding/generated-binding#custom_binding_class_names ).
Link "
The <data> tag we are referring on this ticket is about Data Binding (for layout files) as Yigit specified (link
da...@google.com <da...@google.com> #9
Sorry, that was a dumb mistake on my part. Thanks for the better link.
da...@google.com <da...@google.com>
da...@google.com <da...@google.com> #10
This fix should land in Canary 13.
Note that this first fix is minimal - it just stops the error highlight from showing up.
I additionally openedhttps://issuetracker.google.com/130646363 , which I'm currenty working on, which improves the feature so that it feels solid (e.g. code generation happens immediately, invalid values are highlighted red with an error message). That is likely to land one release later.
Note that this first fix is minimal - it just stops the error highlight from showing up.
I additionally opened
mi...@gmail.com <mi...@gmail.com> #11
Resolved on:
Android Studio 3.5 Canary 13
Build #AI-191.6183.87.35.5487692, built on April 19, 2019
JRE: 1.8.0_202-release-1483-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
Android Studio 3.5 Canary 13
Build #AI-191.6183.87.35.5487692, built on April 19, 2019
JRE: 1.8.0_202-release-1483-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
da...@google.com <da...@google.com> #12
Thanks for confirming!
zh...@gmail.com <zh...@gmail.com> #13 Restricted+
Restricted+
Comment has been deleted.
Description
Build: $VERSION, AI-183.4588.61.34.5202479, 201812280013,
AI-183.4588.61.34.5202479, JRE 1.8.0_152-release-1248-b01x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 2194x1234, 1920x1080
Android Gradle Plugin: 3.4.0-alpha10
Gradle: 5.1
NDK: from local.properties: (not specified); latest from SDK: (not found);
LLDB: pinned revision 3.1 not found; latest from SDK: (package not found);
CMake: from local.properties: (not specified); latest from SDK: (not found); from PATH: (not found);
IMPORTANT: Please read