Dean Clancy Dean Clancy - 1 month ago 183
Android Question

Android Studio -Unable to inflate view tag without class attribute

When I enter a view tag into my xml code I get a Rendering Problem that says: "Unable to inflate view tag without class attribute". How can I fix this ?

<view
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@android:color/darker_gray">
</view>


When I remove this code it renders fine.

Answer

As mention in comment by Blackbelt, update view to View

<View
        android:layout_width="1dp"
        android:layout_height="match_parent"
        android:background="@android:color/darker_gray">
    </View>