Class Not Found Android Support Design Widget NavigationView

这一生的挚爱 提交于 2019-12-05 06:45:50
Vignesh

Follow this steps:

  1. Right Click on your Project->Open Module Settings.
  2. Then open Dependencies Tab.
  3. Click on + symbol then select Library Dependency.You will get an popup called Choose Library Dependency.
  4. There Enter "com.android.support". Then click on search icon.

  1. Now select the design library. and Click on OK.

Thank you for your concerns, I appreciate it. I found the answer for (my) this question at last.

Error inflating class android.support.design.widget.NavigationView #28 or #29

The solution that works for me, is that you must match your support design library and your support AppCompat Library. In the gradle module,

change the gradle version (Your desired library no. ) You can also find the latest gradle build in the link that I have given, but I suggest you check in your gradle module (The 2nd Picture, since they are first in updating the gradle build. Then in my gradle module - compile: ... has been highlighted , meaning there is a newer version, just change the no. e.g 24.0.0 compile if it is stable, not preview), in a mean time, mine is 23.1.1 .

-> more gradle lib- gradleplease.appspot.com

compile 'com.android.support:appcompat-v7:23.1.1'

compile 'com.android.support:design:23.1.1'

:) It works for me!

Observation (For me, As I changed/solved this error, the value 23.x.x): if your support-design doesn't match with AppCompat-lib produces #28 and if your AppCompat doesn't match the support-design produces #29. Just try, maybe I interchange the #.

You are getting this error because you need the Design Support Library.

Open SDK Manager and download Android Support Repository, than you can find the last version of the library here:

<android-sdk>/extras/android/m2repository/com/android/support/design/23.0.1/design-23.0.1.aar

Copy it in your libs directory then add the dependency to your build.gradle:

repositories {
    flatDir {
        dirs 'libs'
    }
}

dependencies {
    compile 'android.support.design:design:23.0.1@aar'
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!