膨胀类androidx.drawerlayout.widget.DrawerLayout时出错

时间:2019-02-01 20:43:14

标签: android android-studio android-layout android-xml drawerlayout

我的项目运行完全正常,突然我什么也没有发生,现在它给了我错误,即** class androidx.drawerlayout.widget.DrawerLayout

here is logcat      造成原因:java.lang.ClassNotFoundException:在路径:DexPathList [[zip文件“ /data/app/com.umangSRTC.thesohankathait.umang-L2YCZYWk4BZhAgX-I8MBnQ== /base.apk"],nativeLibraryDirectories=[/data/app/com.umangSRTC.thesohankathait.umang-L2YCZYWk4BZhAgX-I8MBnQ==/lib/arm64、/system/lib64、/system/vendor/lib64]]         在dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)**

我尝试了所有找到的解决方案,即 清理项目,重建项目,使缓存无效等。但是它们都不起作用。

这是我的xml文件:

<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.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"
android:fitsSystemWindows="true"
tools:openDrawer="start">


<include
    layout="@layout/app_bar_functionality"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

<com.google.android.material.navigation.NavigationView
    android:id="@+id/nav_view"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    android:fitsSystemWindows="true"
    app:headerLayout="@layout/nav_header_functionality"
    app:menu="@menu/activity_functionality_drawer" />

 </androidx.drawerlayout.widget.DrawerLayout>

0 个答案:

没有答案