0

After adding the new dependencies in the build.gradle

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.thebluealliance:spectrum:0.5.0'
compile 'com.github.sillebille:dynamic-calendar:1.0.1'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:support-v4:23.0.1'}

Caused the following exception

Caused by: java.lang.NoClassDefFoundError: android.support.design.internal.NavigationMenuPresenter
 at android.support.design.widget.NavigationView.<init>(NavigationView.java:80)
 at android.support.design.widget.NavigationView.<init>(NavigationView.java:92)
 at java.lang.reflect.Constructor.newInstance(Native Method) 
 at java.lang.reflect.Constructor.newInstance(Constructor.java:288) 
 at android.view.LayoutInflater.createView(LayoutInflater.java:611) 
 at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:747) 
 at android.view.LayoutInflater.rInflate(LayoutInflater.java:810) 
 at android.view.LayoutInflater.inflate(LayoutInflater.java:508) 
 at android.view.LayoutInflater.inflate(LayoutInflater.java:418) 
 at android.view.LayoutInflater.inflate(LayoutInflater.java:365) 
 at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280)

Is there any problem the added library or some proguard has to be added to make this work?

dds
  • 2,335
  • 1
  • 31
  • 45
Deepak M
  • 223
  • 4
  • 14
  • See here:http://stackoverflow.com/questions/32723868/noclassdeffounderror-android-support-design-internal-navigationmenu-on-android also possibly related: http://verybadalloc.com/android/2015/12/19/special-place-for-samsung-in-android-hell/ – Daniel Nugent Jun 07 '16 at 19:12
  • Try to invalidate cashes of android studio. Go to File-> InvalidateCashes /Restart – once2go Jun 07 '16 at 20:01

1 Answers1

0

A "NoClassDefFoundError" means that you're trying to use a class that either isn't defined, or doesn't exist. Double check that any libraries you're using are installed correctly if they're open source, and if you're quite sure that everything is correct, it might just be a problem with the API. I've run into this error loads of times because API's are either riddled with errors or are simply not complete. Probably not what you wanted to hear, but I hope it helps!

Mr. DROP TABLE
  • 334
  • 2
  • 9