gpt4 book ai didi

android - java.lang.NoClassDefFoundError : android. support.v7.widget.* 自从升级到支持库 v23

转载 作者:太空狗 更新时间:2023-10-29 13:18:13 26 4
gpt4 key购买 nike

我正在使用 MaterialDialog我的应用程序中的库。
昨天我已经将库版本更新到最新版本,并且由于它使用了一些新注释,所以我还必须更新 Support V7 库。
从那以后,无法加载带有小部件(CheckBox/RadioButton)的屏幕。
这是堆栈:

08-30 21:53:10.418: E/AndroidRuntime(30341): FATAL EXCEPTION: main
08-30 21:53:10.418: E/AndroidRuntime(30341): Process: com.xx.xxx, PID: 30341
08-30 21:53:10.418: E/AndroidRuntime(30341): java.lang.NoClassDefFoundError: android.support.v7.widget.AppCompatCheckBox
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.support.v7.internal.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:89)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.support.v7.app.AppCompatDelegateImplV7.createView(AppCompatDelegateImplV7.java:886)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:940)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:725)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.LayoutInflater.inflate(LayoutInflater.java:482)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.preference.Preference.onCreateView(Preference.java:516)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.preference.Preference.getView(Preference.java:487)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.preference.PreferenceGroupAdapter.getView(PreferenceGroupAdapter.java:246)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.AbsListView.obtainView(AbsListView.java:2346)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.ListView.makeAndAddView(ListView.java:1864)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.ListView.fillDown(ListView.java:698)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.ListView.fillFromTop(ListView.java:759)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.ListView.layoutChildren(ListView.java:1659)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.AbsListView.onLayout(AbsListView.java:2150)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.View.layout(View.java:15595)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.ViewGroup.layout(ViewGroup.java:4966)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.LinearLayout.onLayout(LinearLayout.java:1466)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.View.layout(View.java:15595)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.ViewGroup.layout(ViewGroup.java:4966)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.View.layout(View.java:15595)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.ViewGroup.layout(ViewGroup.java:4966)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1076)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.View.layout(View.java:15595)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.ViewGroup.layout(ViewGroup.java:4966)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.View.layout(View.java:15595)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.ViewGroup.layout(ViewGroup.java:4966)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.LinearLayout.onLayout(LinearLayout.java:1466)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.View.layout(View.java:15595)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.ViewGroup.layout(ViewGroup.java:4966)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.View.layout(View.java:15595)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.ViewGroup.layout(ViewGroup.java:4966)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.LinearLayout.onLayout(LinearLayout.java:1466)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.View.layout(View.java:15595)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.ViewGroup.layout(ViewGroup.java:4966)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.View.layout(View.java:15595)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.ViewGroup.layout(ViewGroup.java:4966)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2072)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1829)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1054)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5786)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.Choreographer.doCallbacks(Choreographer.java:580)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.Choreographer.doFrame(Choreographer.java:550)
08-30 21:53:10.418: E/AndroidRuntime(30341): at android.view.Choreographer$FrameDisplayE

同样适用于 AppCompatRadioButton

我已经尝试删除/删除/重新添加支持库
我也曾尝试将 MaterialDialog 库还原为旧版本,但也没有成功
我还将 CheckBox 添加到简单的 PreferenceFragment 并引发了相同的异常。

我使用的是 eclipse,而不是 Android Studio。

最佳答案

尝试手动将新版本的 android-sdk\extras\android\support\v13\android-support-v13.jar 复制到您的 libs 文件夹中。

如果您使用的是 Android Studio,则可以使用编译 'com.android.support:support-v13:23.0.0':23+ 而不是复制它。

不仅,使用 Eclipse,如果你有其他支持库中的 jar,你也应该通过手动复制它们来更新它们。

关于android - java.lang.NoClassDefFoundError : android. support.v7.widget.* 自从升级到支持库 v23,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32300142/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com