Unexpected namespace prefix “app” found for tag RelativeLayout - Android?

后端 未结 7 2281
走了就别回头了
走了就别回头了 2021-02-13 04:46

I need to use BottomSheetBehavior with ScrollView but it says to me :

Unexpected namespace prefix \"app\" found for tag RelativeLayout
         


        
相关标签:
7条回答
  • 2021-02-13 05:28

    Try setting your xmlns namespace once in the parent layout if you are going to use it multiple times.

    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:android="http://schemas.android.com/apk/res/android"
    

    Writing this declaration once in your parent CoordinatorLayout will suffice.

    Hint: When using multiple layouts and views, try to implement the <include/> attribute. It will make your code clean and easily readable.

    0 讨论(0)
提交回复
热议问题