我已經將Android支持庫從版本23.1.1更新到23.2.0,並且必須更新Android Studio中的Android支持庫存儲庫。由於新版本中存在一些錯誤,我想降級它。 降級到23.1.1之後,我得到了這些錯誤NoClassDefFoundError降級時Androod支持lib從23.2.0到23.1.1
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)
當我打電話 TabLayout.setupWithViewPager(ViewPager)
相同的代碼可以編譯之前升級支持庫
有沒有人找到解決方案呢? – Jack
讓我們清理你的項目 - >重建。仍然有錯誤,讓我們檢查一下,看看紅線編輯器的錯誤警告 - >用有效的類替換它 – GiapLee