Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TabLayout crashing after updating support library to 23.2.1

Everything was working fine until i updated my gradle file and now my tablayout is crashing due to error:

Java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/widget/TintManager; at android.support.design.widget.TabLayout$TabView.(TabLayout.java:1185) at android.support.design.widget.TabLayout.createTabView(TabLayout.java:656) at android.support.design.widget.TabLayout.addTabView(TabLayout.java:695) at android.support.design.widget.TabLayout.addTab(TabLayout.java:386) at android.support.design.widget.TabLayout.addTab(TabLayout.java:361) at android.support.design.widget.TabLayout.setTabsFromPagerAdapter(TabLayout.java:645) at android.support.design.widget.TabLayout.setupWithViewPager(TabLayout.java:616) at com.example.ScrollableTabsActivity.onCreate(ScrollableTabsActivity.java:307) at android.app.Activity.performCreate(Activity.java:6033) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2288) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2397) at android.app.ActivityThread.access$800(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1310) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5268) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697) Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.TintManager" on path: DexPathList[[zip file "/data/app/com.example-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at android.support.design.widget.TabLayout$TabView.(TabLayout.java:1185) at android.support.design.widget.TabLayout.createTabView(TabLayout.java:656) at android.support.design.widget.TabLayout.addTabView(TabLayout.java:695) at android.support.design.widget.TabLayout.addTab(TabLayout.java:386) at android.support.design.widget.TabLayout.addTab(TabLayout.java:361) at android.support.design.widget.TabLayout.setTabsFromPagerAdapter(TabLayout.java:645) at android.support.design.widget.TabLayout.setupWithViewPager(TabLayout.java:616)

 

Here is my gradle file

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
    applicationId "com.example"
    minSdkVersion 11
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.0'
compile 'com.android.support:cardview-v7:23.2.1'
compile 'com.android.support:recyclerview-v7:23.2.1'
compile 'com.mcxiaoke.volley:library:1.0.+@aar'
compile 'com.github.hotchemi:stringpicker:0.0.2'
compile files('libs/devsmartlib.jar')
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1@aar'
compile 'com.daimajia.androidanimations:library:1.1.3@aar'
compile project(':lib')
}

Please help me where am wrong

like image 791
asish rauto Avatar asked Mar 18 '16 08:03

asish rauto


1 Answers

changing dependencies did the trick , just added com.android.support:support-v4:23.2.0 and updated build tools version to 23.0.2

compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:design:23.2.0'
compile 'com.android.support:recyclerview-v7:23.2.0'
compile 'com.android.support:support-v4:23.2.0'
compile 'com.android.support:cardview-v7:23.2.0'

I dont know why some people marked my question as negative, anyways this might help someone

like image 197
asish rauto Avatar answered Sep 17 '22 23:09

asish rauto