动画文件使用SherlockActionBar崩溃应用程序

时间:2012-05-15 20:25:06

标签: android actionbarsherlock

当我将动画xml文件添加到我的项目中时(我正在尝试缩放,旋转,设置)并尝试在Android 2.1虚拟机中启动它,它在logcat中崩溃了以下消息

05-16 00:14:01.821: E/AndroidRuntime(898): Uncaught handler: thread main exiting due to uncaught exception
05-16 00:14:01.861: E/AndroidRuntime(898): java.lang.RuntimeException: Unable to start activity ComponentInfo{su.k_r.tasstelecom/su.k_r.tasstelecom.CategoriesActivity}: android.view.InflateException: Binary XML file line #31: Error inflating class com.actionbarsherlock.internal.widget.ActionBarView
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.os.Handler.dispatchMessage(Handler.java:99)
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.os.Looper.loop(Looper.java:123)
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.app.ActivityThread.main(ActivityThread.java:4363)
05-16 00:14:01.861: E/AndroidRuntime(898):  at java.lang.reflect.Method.invokeNative(Native Method)
05-16 00:14:01.861: E/AndroidRuntime(898):  at java.lang.reflect.Method.invoke(Method.java:521)
05-16 00:14:01.861: E/AndroidRuntime(898):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
05-16 00:14:01.861: E/AndroidRuntime(898):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
05-16 00:14:01.861: E/AndroidRuntime(898):  at dalvik.system.NativeStart.main(Native Method)
05-16 00:14:01.861: E/AndroidRuntime(898): Caused by: android.view.InflateException: Binary XML file line #31: Error inflating class com.actionbarsherlock.internal.widget.ActionBarView
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.view.LayoutInflater.createView(LayoutInflater.java:513)
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
05-16 00:14:01.861: E/AndroidRuntime(898):  at com.actionbarsherlock.internal.ActionBarSherlockCompat.generateLayout(ActionBarSherlockCompat.java:1042)
05-16 00:14:01.861: E/AndroidRuntime(898):  at com.actionbarsherlock.internal.ActionBarSherlockCompat.installDecor(ActionBarSherlockCompat.java:912)
05-16 00:14:01.861: E/AndroidRuntime(898):  at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:846)
05-16 00:14:01.861: E/AndroidRuntime(898):  at com.actionbarsherlock.app.SherlockListActivity.setContentView(SherlockListActivity.java:212)
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.app.ListActivity.ensureList(ListActivity.java:305)
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.app.ListActivity.getListView(ListActivity.java:290)
05-16 00:14:01.861: E/AndroidRuntime(898):  at su.k_r.tasstelecom.CategoriesActivity.onCreate(CategoriesActivity.java:72)
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
05-16 00:14:01.861: E/AndroidRuntime(898):  ... 11 more
05-16 00:14:01.861: E/AndroidRuntime(898): Caused by: java.lang.reflect.InvocationTargetException
05-16 00:14:01.861: E/AndroidRuntime(898):  at com.actionbarsherlock.internal.widget.ActionBarView.<init>(ActionBarView.java:235)
05-16 00:14:01.861: E/AndroidRuntime(898):  at java.lang.reflect.Constructor.constructNative(Native Method)
05-16 00:14:01.861: E/AndroidRuntime(898):  at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
05-16 00:14:01.861: E/AndroidRuntime(898):  at android.view.LayoutInflater.createView(LayoutInflater.java:500)
05-16 00:14:01.861: E/AndroidRuntime(898):  ... 26 more
05-16 00:14:01.861: E/AndroidRuntime(898): Caused by: java.lang.NullPointerException
05-16 00:14:01.861: E/AndroidRuntime(898):  at com.actionbarsherlock.internal.widget.ActionBarView$HomeView.setUp(ActionBarView.java:1302)
05-16 00:14:01.861: E/AndroidRuntime(898):  ... 30 more

我甚至不在代码中使用动画。 哪里我做错了?

在android 4.0中,一切都很棒

1 个答案:

答案 0 :(得分:2)

清洁ABS项目修复问题