How can I import the class android.graphics.drawable.shapes.Shape in XML in Android Studio? I'm getting "Cannot resolve class shape".
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
</shape>
I think there aren't any problem in the code. Why don't you check these things.
something
part.<?xml version="1.0" encoding="utf-8"?>
at the top.<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
</shape>
right click on the drawable folder then new, select drawable resource file give any file name change that selector to shape and encode the file using UTF-8 like this
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/white" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With