Home > Back-end >  Android Studio says "androidx.drawerlayout.widget.DrawerLayout" was not found in the proje
Android Studio says "androidx.drawerlayout.widget.DrawerLayout" was not found in the proje

Time:02-02

[enter image description here][1]

[1]: https://i.stack.imgur.com/A8LGg.png`<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"> `

CodePudding user response:

Try doing any of these methods:

  • Close your android project by going to File -> Close Project. And then import it again
  • If above option doesn't works for you then Go to File -> Invalidate Caches/Restart

If neither of them work the remove the dependency and add it again and tell me the build output when gradle sync finishes

CodePudding user response:

It may possible that your studio cache is corrupted;

So

  • close your all project first; then
  • open your studio path in your C:\ Drive; for eg. it should like C:\Users\hp(Your_User_Name)\.AndroidStudio4.0\system\caches... Delete this caches folder.

Now start your project again, issue will gone now.

Hope this may help to someone.

  •  Tags:  
  • Related