【问题标题】:Android Studio - "layout_constraintTop_toEndOf not found."Android Studio - “未找到 layout_constraintTop_toEndOf。”
【发布时间】:2019-04-06 18:13:54
【问题描述】:

使用所见即所得编辑器重新排列布局后,出现了问题。我对现有的 TextView 设置了一些新的约束,发现我无法再编译。

Java 编译器显示 failed linking file resources,而问题是 layout_constraintTop_toEndOf' not found.

我的布局是一个 ConstraintLayout,我的成绩文件有 implementation 'com.android.support.constraint:constraint-layout:1.1.3' 行。

我尝试了Sync Project with Gradle FilesBuild -> Clean ProjectInvalidate Caches / Restart,但没有成功。

我真的不知道该说什么了;如果删除约束,我将无法运行代码(我收到元素需要约束的警告),但我无法使用约束集运行代码。

谷歌搜索没有任何用处,看来我可能不得不重新安装并从那里开始,除非其他人遇到了类似的问题。

【问题讨论】:

    标签: xml android-studio gradle wysiwyg


    【解决方案1】:

    您尝试使用的约束layout_constraintTop_toEndOf 无效。有关您可以选择的约束列表,请参阅此链接(参见图 2): https://developer.android.com/reference/android/support/constraint/ConstraintLayout

    【讨论】:

      猜你喜欢
      • 2014-03-05
      • 2018-12-23
      • 1970-01-01
      • 1970-01-01
      • 2021-10-04
      • 2020-07-12
      • 1970-01-01
      • 1970-01-01
      • 2017-01-25
      相关资源
      最近更新 更多