I have the following xml:
<android.support.v4.widget.DrawerLayout
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/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/container"
/>
<android.support.design.widget.NavigationView
android:id="@+id/navigationView"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
/>
</android.support.v4.widget.DrawerLayout>
但是我遇到了错误:no such class android.support.design.widget.NavigationView
以下是我的Gradle中的SDK配置:
minSdkVersion 16
targetSdkVersion 23
出于安全原因,我的项目不允许使用jcenter或远程仓库,因此我必须始终将依赖项作为jar文件包含在项目中。如何解决这个错误?
compile ':design:23.0.1@aar'
。重要的部分是第二部分和标识文件的版本号。 - Mattia Maestrini