darsh2 / MultipleImageSelect

Android library that provides for multiple image selection.
Apache License 2.0
300 stars 112 forks source link

Cannot cast appbarlayout to toolbar #40

Open nicchong opened 7 years ago

nicchong commented 7 years ago
  <include
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        layout="@layout/toolbar"/>

id/toolbar should be used in instead of include tag

darsh2 commented 7 years ago

Hey can you provide more context regarding the issue?

nicchong commented 7 years ago

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 commented 7 years ago

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 commented 5 years ago

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