android - 未声明 android.support.design.widget.CoordinatorLayout

标签 android xamarin xamarin.android

我正在 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/

相关文章:

Android 工具栏不从 Backstack 上的 fragment 调用 onOptionsItemSelected

java - Android:具有双值的字符串格式

android - 更改许多控件的默认颜色

android - 继续运行后台服务(Android)

c# - 如何让 Google Glass 手势与 Xamarin 配合使用?

android - Eclipse 无法识别我的 android 设备,为什么?

xamarin - 使用 xamarin 表单在 ListView 上添加左右完全滑动手势

c# - Xamarin-MediaPlugin保存到相册在iOS下不起作用

xamarin - 如何解决 Xamarin.Forms.Platform.Android.ListViewAdapter.IsEnabled 异常?

java检查日期是否是本月的第一个星期日