我尝试在Mac的Visual Studio中的xamarin android中使用Constraint.Layout创建布局。
我已经为Constraint.Layout和Constraint.Layout.Solver添加了nuget包

android - 在包(APT0000)Xamarin ConstraintLayout中找不到属性'layout_constraintTop_toBottomOf'的资源标识符-LMLPHP

布局具有-> xmlns:app =“ http://schemas.android.com/apk/res-auto”

但是我总是得到这样的错误


  '找不到用于归因的资源标识符
  包(APT0000)中的“ layout_constraintTop_toBottomOf”。


当我运行该应用程序时。

有谁可以帮助我吗?

最佳答案

ConstraintLayout位于Xamarin.Android.Support.Constraint.Layout包下。
您必须从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>

android - 在包(APT0000)Xamarin ConstraintLayout中找不到属性&#39;layout_constraintTop_toBottomOf&#39;的资源标识符-LMLPHP

关于android - 在包(APT0000)Xamarin ConstraintLayout中找不到属性'layout_constraintTop_toBottomOf'的资源标识符,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/51664925/

10-11 22:38
查看更多