我正在 Visual Studio 2015 中使用 Xamarin 创建新的 Android 应用程序。 我将组件 Android Support Design Library 23.4.0.1 添加到我的项目(组件) 在我的布局 (Main.axml) 中,我从入门 https://components.xamarin.com/gettingstarted/xamandroidsupportdesign 复制并过去 但是我得到错误 The android.support.design.widget.CoordinatorLayout is not declared
有什么想法吗?
Maxin.axml:
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
app:layout_scrollFlags="scroll|enterAlways">
<android.support.design.widget.TabLayout
app:layout_scrollFlags="scroll|enterAlways" />
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
</android.support.design.widget.CoordinatorLayout>
最佳答案
尝试卸载支持库,然后重新安装。
如果这不起作用,请尝试进入 C:\Users\{Your User}\AppData\Local\Xamarin
并删除其中的所有文件夹。然后在 Visual Studio 中执行清理和重建。
关于android - 未声明 android.support.design.widget.CoordinatorLayout,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39018779/