Sunday 15 March 2015

android - I get an error with almost any AppCompat v21 widget I try to use -



android - I get an error with almost any AppCompat v21 widget I try to use -

i've starteda new project , i've been trying couple days create work new material design appcompat (v21) everytime seek set widget cardview or new toolbar end error doesn't allow screen draw them.

for example, code:

<?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.cardview xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="match_parent" xmlns:card_view="http://schemas.android.com/apk/res-auto" android:layout_margin="5dp" card_view:cardcornerradius="5dp" android:layout_height="match_parent"> <relativelayout android:layout_width="match_parent" android:layout_height="100dp"> </relativelayout> </android.support.v7.widget.cardview>

returns error:

the next classes not instantiated: - android.support.v7.widget.cardview (open class, show exception)

also, using code:

<android.support.v7.widget.toolbar android:id="@+id/my_awesome_toolbar" android:layout_height="wrap_content" android:layout_width="match_parent" android:minheight="?attr/actionbarsize" android:background="?attr/colorprimary" />

return error:

missing styles. right theme chosen layout? utilize theme combo box above layout take different layout, or prepare theme style references. failed find style 'toolbarstyle' in current theme (6 similar errors not shown)

i have added appcompat gradle build , i'm using theme.appcompat.light extending actionbaractivity.

am doing wrong? give thanks in advanced.

i think it's layout editor's bug.

try run app see if there's actual error.

android android-studio appcompat

No comments:

Post a Comment