【问题标题】:No Resource Identifier found for attribut 'layout_constraintTop_toBottomOf' in package (APT0000) Xamarin ConstraintLayout在包 (APT0000) Xamarin ConstraintLayout 中找不到属性“layout_constraintTop_toBottomOf”的资源标识符
【发布时间】:2018-08-03 03:31:31
【问题描述】:
我尝试在 Visual Studio for Mac 的 xamarin android 中使用 Constraint.Layout 创建布局。
我已经为 Constraint.Layout 和 Constraint.Layout.Solver 添加了 nuget 包
而且布局有 -> xmlns:app="http://schemas.android.com/apk/res-auto"
但我总是收到错误提示
'没有找到属性的资源标识符
'layout_constraintTop_toBottomOf' 在包 (APT0000)'中。
当我运行应用程序时。
有人可以帮帮我吗?
【问题讨论】:
标签:
android
xamarin
layout
constraints
【解决方案1】:
ConstraintLayout 隶属于Xamarin.Android.Support.Constraint.Layout packges。
您必须从 nuget 包管理器安装它才能使用 Contraint.Layout。
你的布局应该是这样的
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/contraint_Activity"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.constraint.ConstraintLayout>