Issue
Undeclared namespace prefix "android" (for attribute "layout_width")
How can I fix this? This says that android is not defined. How can I solve it? please help
Solution
try to add this in the layout
xmlns:android="http://schemas.android.com/apk/res/android
here is an example:
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
Answered By - Kyler Nguyen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.