I'm testing my project on MotoG (Lollipop 5.1) and a have problem that didn't have on XperiaT2 (KitKat 4.4). The error log is:
java.lang.NoClassDefFoundError: android.support.design.internal.NavigationMenuItemView
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:309)
I'm using android.support:design library but not instanciate the NavigationView, I tried to use
compile 'com.android.support:design:22.2.1'
and
compile 'com.android.support:design:23.1.1'
And didn't solve. Maybe the problem is related with a previously problem with support:appcompat library that this error happened when I tried use a 23.1.1 lower version
NoClassDefFoundError: android.support.v4.hardware.fingerprint.FingerprintManagerCompatApi23$1
My actual Gradle configuration is:
android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
defaultConfig {
minSdkVersion 19
targetSdkVersion 21
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.android.support:design:22.2.0'
compile 'com.android.support:cardview-v7:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
Please some help.
UPDATE
When I try to use
buildToolsVersion '23.0.2'
'com.android.support:appcompat-v7:23.1.1'
'com.android.support:design:23.1.1'
I have error to render the preview on android studio
Exception Details java.lang.IllegalArgumentException: You need to use a Theme.AppCompat theme (or descendant) with the design library.
Even using my theme this way
<style name="MyTheme" parent="Theme.AppCompat.Light">