Attribute android:id is not allowed here in new kotlin project in activity_main.xml

后端 未结 3 826
有刺的猬
有刺的猬 2021-01-21 14:39

I get errors in new Android Studio project in Kotlin connected with attributes: \'Attribute android:x is not allowed here\"

file: activity_main.xml



        
3条回答
  •  天涯浪人
    2021-01-21 15:29

    In your root element, replace:

    xmlns:android="http://www.w3.org/1999/XSL/Transform"
    

    with:

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

    Also, remove xmlns="http://schemas.android.com/apk/res/android" from your root element.

提交回复
热议问题