question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error: cannot access AttachedBehavior

See original GitHub issue

Step 1: Are you in the right place?

  • I have verified there are no duplicate active or recent bugs, questions, or requests
  • I have verified that I am using the latest version of the library.

Step 2: Describe your environment

  • Library version: com.leinardi.android:speed-dial:1.0-alpha05
  • Android version: 7.0
  • Support library version: 26.1.0
  • Device brand: Samsung
  • Device model: S6

Step 3: Describe the problem:

Steps to reproduce:

  1. Add a SpeedDialView to your view as per the readme.
  2. Add a corresponding SpeedDialView member to your activity class.
  3. Attempt to compile.

Observed Results:

During compilation, you will receive the following message, which occurs at the first reference to the member in the activity class (after definition):

error: cannot access AttachedBehavior
class file for android.support.design.widget.CoordinatorLayout$AttachedBehavior not found

Expected Results:

I’d have expected the app to compile as normal. It’s not clear to me what’s missing or what’s wrong.

So far I’ve found no reference to this particular error message or what might be causing it. I was previously not using a CoordinatorLayout but adding one (and ensuring that the SpeedDialView is a direct child of it) does not seem to have changed the compilation error (or gotten rid of it).

I have also tried with an without the app:layout_behavior parameter.

Relevant Code:

...

    <com.leinardi.android.speeddial.SpeedDialView
        android:id="@+id/fab_actions"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        app:srcCompat="@drawable/ic_add_white_24dp"
        app:layout_behavior="@string/speeddial_scrolling_view_snackbar_behavior"
        />

</android.support.design.widget.CoordinatorLayout>

and:

@BindView(R.id.fab_actions) SpeedDialView fab_actions; (I’m using ButterKnife to do the binding) fab_actions.setEnabled(view != null); (this is where the error appears)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
leinardicommented, May 3, 2018

Thanks for the additional info.

I was hoping for an option to be able to control the truncation and/or font-size of the labels

You can control the width of the label and, consequently, where the text will be truncated, overriding the dimen sd_label_max_width: https://github.com/leinardi/FloatingActionButtonSpeedDial#how-can-i-change-the-maximum-length-of-the-label You can change the label text size overriding the style SpeedDial.FabLabelStyle: https://github.com/leinardi/FloatingActionButtonSpeedDial/blob/1fab81cfb5076ac9e7809296f6c2616544b06491/library/src/main/res/values/styles.xml#L34

Let me know if you manage to put a sample project together 😃

0reactions
no-response[bot]commented, May 24, 2018

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don’t have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Attached Behavior property not being set by binding in UWP
When the migration is complete, you will access your Teams at stackoverflowteams.com, and they will no longer appear in the left sidebar on ......
Read more >
Attached property usage error - MSDN - Microsoft
I am trying to use attached property... And i get errors ... here is my code < Window x:Class ="WpfApplication4.
Read more >
CoordinatorLayout.AttachedBehavior - Android Developers
Defines the default attached Behavior of a View class. When writing a custom view, implement this interface to return the default behavior ...
Read more >
Error #1009 - Anyone know how to fix this? - Stencyl Community
First of all, this is the error: TypeError: Error #1009: Cannot access a property or method of a null object reference.
Read more >
Introduction to Attached Behaviors in WPF - CodeProject
This article explains what an attached behavior is, ... that you set an attached property on an element so that you can gain...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found