如何修复此>属性应用程序:constraintBottom_toBottomOf未找到

安卓新手在这里。

我正在构建和AR应用程序,现在我计划添加一个用户界面。我正在尝试添加约束布局,但是我得到错误,即找不到此约束app:layout_constraintBottom_toBottomOf="parent"

这些是我的代码和错误消息:

http://img4.mukewang.com/6318a27300010d7f06610461.jpg

我在activity_ux.xml文件中添加的所有代码行都以“app”开头,例如 似乎不起作用,我只是在这里向您展示了一个示例,其中一个只是为了使其更易于调试。app:layout_constraintBottom_toTopOf


我尝试在线搜索,其中一个解决方案是我应该在我的SDK工具中安装“ConstraintLayout for Android”和“Solver for ConstraintLayout”,但我已经安装了这个。


    <FrameLayout 

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

          xmlns:tools="http://schemas.android.com/tools"

          android:layout_width="match_parent"

          android:layout_height="match_parent"

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

          tools:context="com.google.ar.sceneform.Overlei.Overlei">


    <fragment android:name="com.google.ar.sceneform.ux.ArFragment"

          android:id="@+id/ux_fragment"

          android:layout_width="match_parent"

          android:layout_height="match_parent" />


    <LinearLayout

          android:id="@+id/gallery_layout"

          android:layout_width="match_parent"

          android:layout_height="wrap_content"

          android:orientation="horizontal"

          app:layout_constraintBottom_toBottomOf="parent"

  >


   </LinearLayout>


   </FrameLayout>

我期望这只是工作,我不知道如果内置函数(例如这个)不起作用,我可以从哪里开始寻找。


慕容森
浏览 190回答 3
3回答

达令说

谢谢你的建议伙计们。我已经设法通过添加此行来处理错误implementation&nbsp;'com.android.support.constraint:constraint-layout:1.1.3'进入我的下build.gradle(module.app)dependencies再次,谢谢你的一切

梵蒂冈之花

应仅在 中使用。您可以尝试在线性布局中使用内部。app:layout_constraintBottom_toBottomOfConstraintLayoutFrameLayoutandroid:gravity = "bottom"

慕桂英4014372

将框架布局包装在约束布局中或将框架布局更改为约束布局
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java