Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NoClassDefFoundError when downgrade Androod support lib from 23.2.0 to 23.1.1

I've update the Android Support Library from version 23.1.1 to 23.2.0 and have to update the Android Support Library Repository in Android studio. Since there's some bugs in the new version, I want to downgrade it. After downgrading to 23.1.1, I got these errors

 java.lang.NoClassDefFoundError: Failed resolution of: android/support/v7/widget/TintManager;
at android.support.design.widget.TabLayout$TabView.<init>(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 co.appedu.snapask.activity.MainActivity.onStart(MainActivity.java:174)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1236)
at android.app.Activity.performStart(Activity.java:6006)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2321)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2420)
at android.app.ActivityThread.access$900(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5292)
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:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)

when I call TabLayout.setupWithViewPager(ViewPager)

The same code can compile before upgrade the Support Library

like image 654
Edward Avatar asked Nov 08 '22 19:11

Edward


1 Answers

Please check if you also updated other dependencies. I had similar issue and my problem was in other library which depended on 23.2.0.

like image 63
basv Avatar answered Nov 14 '22 21:11

basv