navasmdc / MaterialDesignLibrary

This is a library with components of Android L to you use in android 2.2
Apache License 2.0
8.99k stars 2.22k forks source link

Android Studio Preview Error #163

Open hanc1208 opened 9 years ago

hanc1208 commented 9 years ago

i got error in preview window while i am writing xml.

<com.gc.materialdesign.views.ButtonRectangle android:layout_width="113dp" android:layout_height="45dp" android:text="OK"/>

java.lang.NoSuchFieldError: shape_bacground at com.gc.materialdesign.views.Button.setBackgroundColor(Button.java:166) at com.gc.materialdesign.views.Button.setDefaultProperties(Button.java:50) at com.gc.materialdesign.views.ButtonRectangle.setDefaultProperties(ButtonRectangle.java:35) at com.gc.materialdesign.views.Button.(Button.java:36) at com.gc.materialdesign.views.ButtonRectangle.(ButtonRectangle.java:23)

CookieMaster commented 9 years ago

Hmm well first it seems like you spelt "shape_bacground " incorrectly. Should be "shape_background

This could be the cause of the other errors.

hanc1208 commented 9 years ago

I haven't never made the drawable named "shape_bacground". I found "shape_bacground" in the library. (Button.java:166)

CookieMaster commented 9 years ago

Hmm, can you add a picture of the error that comes from the console.

hanc1208 commented 9 years ago

image

        <com.gc.materialdesign.views.ProgressBarDeterminate
            android:layout_width="match_parent"
            android:layout_height="wrap_content"

            android:background="@color/primary"
            android:progress="10"/>
hadidez commented 7 years ago

same issue