Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot cast appbarlayout to toolbar #40

Open
nicchong opened this issue Feb 21, 2017 · 4 comments
Open

Cannot cast appbarlayout to toolbar #40

nicchong opened this issue Feb 21, 2017 · 4 comments

Comments

@nicchong
Copy link

nicchong commented Feb 21, 2017

  <include
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        layout="@layout/toolbar"/>

id/toolbar should be used in <android.support.v7.widget.Toolbar/> instead of include tag

@darsh2
Copy link
Owner

darsh2 commented Mar 9, 2017

Hey can you provide more context regarding the issue?

@nicchong
Copy link
Author

After I include the gradle and call the AlbumSelectActivity will get the exception below

Caused by: java.lang.ClassCastException: android.support.design.widget.AppBarLayout cannot be cast to android.support.v7.widget.Toolbar at com.darsh.multipleimageselect.activities.AlbumSelectActivity.onCreate(AlbumSelectActivity.java:69)

@kyndaqtepammy
Copy link

kyndaqtepammy commented Aug 1, 2017

Mine says_: java.lang.ClassCastException: android.widget.LinearLayout cannot be cast to android.support.v7.widget.Toolbar at com.darsh.multipleimageselect.activities.AlbumSelectActivity.onCreate(AlbumSelectActivity.java:69)_

@tahirghani9
Copy link

have you resolved this issue? i am also facing the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants