我在 CommonsWare 博客上读到,在推出 Android 6.0 之前将 appcompat-v7 更新到最新版本是一个聪明的主意,所以我继续尝试在 Eclipse 中使用我的项目来做到这一点。更新库后(我只是删除了以前的版本并添加了带有资源的新版本),我的(以前的 ActionBarActivity)AppCompatActivity 没有启动(应用程序崩溃)。这是 LogCat 内容:
08-20 02:55:58.417: I/art(28031): Rejecting re-init on previously-failed class java.lang.Class<android.support.v7.app.AppCompatDelegateImplV7>
08-20 02:55:58.418: I/art(28031): Rejecting re-init on previously-failed class java.lang.Class<android.support.v7.app.AppCompatDelegateImplV7>
08-20 02:55:58.419: I/art(28031): Rejecting re-init on previously-failed class java.lang.Class<android.support.v7.app.AppCompatDelegateImplV11>
08-20 02:55:58.419: I/art(28031): Rejecting re-init on previously-failed class java.lang.Class<android.support.v7.app.AppCompatDelegateImplV11>
08-20 02:55:58.419: I/art(28031): Rejecting re-init on previously-failed class java.lang.Class<android.support.v7.app.AppCompatDelegateImplV14>
08-20 02:55:58.420: I/art(28031): Rejecting re-init on previously-failed class java.lang.Class<android.support.v7.app.AppCompatDelegateImplV14>
08-20 02:55:58.420: I/art(28031): Rejecting re-init on previously-failed class java.lang.Class<android.support.v7.app.AppCompatDelegateImplV23>
08-20 02:55:58.420: I/art(28031): Rejecting re-init on previously-failed class java.lang.Class<android.support.v7.app.AppCompatDelegateImplV23>
08-20 02:55:58.421: I/art(28031): Rejecting re-init on previously-failed class java.lang.Class<android.support.v7.app.AppCompatDelegateImplV14>
08-20 02:55:58.421: I/art(28031): Rejecting re-init on previously-failed class java.lang.Class<android.support.v7.app.AppCompatDelegateImplV11>
08-20 02:55:58.421: I/art(28031): Rejecting re-init on previously-failed class java.lang.Class<android.support.v7.app.AppCompatDelegateImplV7>
08-20 02:55:58.421: I/art(28031): Rejecting re-init on previously-failed class java.lang.Class<android.support.v7.app.AppCompatDelegateImplV23>
08-20 02:55:58.421: D/AndroidRuntime(28031): Shutting down VM
08-20 02:55:58.422: E/AndroidRuntime(28031): FATAL EXCEPTION: main
08-20 02:55:58.422: E/AndroidRuntime(28031): Process: com.threeeplusplus.karkoona, PID: 28031
08-20 02:55:58.422: E/AndroidRuntime(28031): java.lang.NoClassDefFoundError: android.support.v7.app.AppCompatDelegateImplV23
08-20 02:55:58.422: E/AndroidRuntime(28031): at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:133)
08-20 02:55:58.422: E/AndroidRuntime(28031): at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:117)
08-20 02:55:58.422: E/AndroidRuntime(28031): at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:456)
08-20 02:55:58.422: E/AndroidRuntime(28031): at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:59)
08-20 02:55:58.422: E/AndroidRuntime(28031): at com.threeeplusplus.karkoona.activities.CentralNavActivity.onCreate(CentralNavActivity.java:154)
08-20 02:55:58.422: E/AndroidRuntime(28031): at android.app.Activity.performCreate(Activity.java:6237)
08-20 02:55:58.422: E/AndroidRuntime(28031): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
08-20 02:55:58.422: E/AndroidRuntime(28031): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
08-20 02:55:58.422: E/AndroidRuntime(28031): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
08-20 02:55:58.422: E/AndroidRuntime(28031): at android.app.ActivityThread.-wrap11(ActivityThread.java)
08-20 02:55:58.422: E/AndroidRuntime(28031): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
08-20 02:55:58.422: E/AndroidRuntime(28031): at android.os.Handler.dispatchMessage(Handler.java:102)
08-20 02:55:58.422: E/AndroidRuntime(28031): at android.os.Looper.loop(Looper.java:148)
08-20 02:55:58.422: E/AndroidRuntime(28031): at android.app.ActivityThread.main(ActivityThread.java:5417)
08-20 02:55:58.422: E/AndroidRuntime(28031): at java.lang.reflect.Method.invoke(Native Method)
08-20 02:55:58.422: E/AndroidRuntime(28031): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
08-20 02:55:58.422: E/AndroidRuntime(28031): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
我一直在尝试解决这个问题几个小时,但没有任何效果!我清理,重新清理,删除了库,重新添加,检查了 .jar 文件中包含的类文件,果然那里有一个 AppCompatDelegateImplV23 等等。什么都没有。
有任何想法吗?