-1
我正在开发android应用程序。在我的应用程序中,我使用了NavigationView。但它显示主要xml文件中的InflateException,并且应用程序被关闭。android.view.inflateexception二进制xml文件行
我的代码是在这里
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" xmlns:app1="http://schemas.android.com/apk/res/com.example.xpressownernew">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<!-- The ActionBar -->
<include
layout="@layout/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<!-- The main content view -->
<FrameLayout
android:id="@+id/flContent"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<!-- The navigation drawer -->
<android.support.design.widget.NavigationView
android:id="@+id/nvView"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@android:color/white"
app:menu="@menu/drawer_view"
app:headerLayout="@layout/nav_header"
/>
</android.support.v4.widget.DrawerLayout>
如何解决这个问题呢?
用完整的Stace Trace发布你的代码。 –
需要stacktrace,drawer_view.xml和你的nav_header。 xml ..... – Opiatefuchs
你只给了部分信息。发布您的logcat和其他xml文件 – AADProgramming