我已将Android支持库从版本23.1.1更新为23.2.0,并且必须更新Android工作室中的Android支持库存储库。由于新版本中存在一些错误,我想降级它。 降级到23.1.1后,我收到了这些错误
game.getTextView().post(new Runnable() {
@Override
public void run() {
game.getTextView().setText(Integer.toString(score));
}
});
我打电话的时候
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)
在升级支持库
之前,可以编译相同的代码答案 0 :(得分:1)
请检查您是否还更新了其他依赖项。我有类似的问题,我的问题出在其他库中,这取决于23.2.0。
答案 1 :(得分:0)
就像@basv所说,23.1.1包含TineManager类,23.2.0删除了它。 23.1.1的Material Design Lib依赖于TineManager。所以同时升级两个库。
我成功地尝试了这种方式。我希望你这样,哈哈。