首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Element androidx.constraintlayout.widget.Constrai?

Element androidx.constraintlayout.widget.Constrai?

提问于 2020-04-17 19:36:00
回答 0关注 0查看 683
代码语言:javascript
复制
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MainActivity">

    <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Hello World!"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>

Element androidx.constraintlayout.widget.ConstraintLayout must be declared老是报这个错误

gradle.build引入的是implementation 'com.android.support.constraint:constraint-layout:1.1.3'

在idea老是报这个错误,去到AndriodStudio就没报错

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档