Cannot find the setter for attribute 'algolia:attribute' with parameter type java.lang.String on android.widget.TextView
See original GitHub issueHello!
After updating to Android Studio 3.0 and to Android Gradle Plugin 3.0, I’ve encountered the following compile time error: Error:(48, 38) Cannot find the setter for attribute 'algolia:attribute' with parameter type java.lang.String on android.widget.TextView.
Here is my layout where I’m using this attribute:
<TextView
android:id="@+id/book_name"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-condensed"
android:padding="6dp"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
android:textSize="20sp"
android:typeface="normal"
android:scrollHorizontally="false"
android:maxLines="5"
algolia:attribute='@{"name"}'
android:layout_marginStart="8dp"
app:layout_constraintLeft_toRightOf="@+id/cover"
android:layout_marginLeft="8dp"
android:layout_marginEnd="16dp"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginRight="16dp"
android:layout_marginTop="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="16dp"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintVertical_bias="0.0" />
Error is raised on 0.8.0 version of instantsearch, as well as on 1.1.2.
Looks like it’s a problem in BindingHelper
class where you set @BindingAdapter("attribute")
. As in docs, now you need to set "bind:attribute"
instead of just "attribute"
, i.e. you need to set XML namespace here, and "bind"
namespace is for custom namespaces.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Cannot find the setter for attribute 'algolia:attribute ... - GitHub
Cannot find the setter for attribute 'algolia:attribute' with parameter type java.lang.String on android.widget.ImageView. #72.
Read more >Cannot find the setter for attribute with parameter
but i have another method @BindingAdapter({"bind:image_round"}) public static void loadRoundImage(ImageView imageView, String url) and it is ...
Read more >Execution failed: cannot find setter for attribute **EDITED
data binding error ****msg:Cannot find the setter for attribute 'algolia:attribute' with parameter type java.lang.String on android.widget.
Read more >Android Data Binding: Custom Setters | by George Mount
The BindingAdapter annotation takes the attribute name as its parameter. Anything in the application namespace doesn't need any namespace in the parameter, but ......
Read more >TextView - Android Developers
java.lang.Object ... To customize the appearance of TextView, see Styles and Themes. XML attributes ... Autofill type for views that cannot be autofilled....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@robertmogos I’ve tried new version already, problem is fixed, project is built successfully.
Thank you😀 I’m glad to hear it.