ActionBarSherlock icon indicating copy to clipboard operation
ActionBarSherlock copied to clipboard

Error in Samples->ABS:Styled while reloading + change display orientation

Open jom1337 opened this issue 11 years ago • 4 comments

10-05 16:51:30.808: E/AndroidRuntime(9701): FATAL EXCEPTION: main 10-05 16:51:30.808: E/AndroidRuntime(9701): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.actionbarsherlock.sample.styled/com.actionbarsherlock.sample.styled.MainActivity}: java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.widget.ProgressBar$SavedState instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/menu_refresh. Make sure other views do not use the same id. 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059) 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3512) 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.app.ActivityThread.access$700(ActivityThread.java:130) 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1201) 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.os.Handler.dispatchMessage(Handler.java:99) 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.os.Looper.loop(Looper.java:137) 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.app.ActivityThread.main(ActivityThread.java:4745) 10-05 16:51:30.808: E/AndroidRuntime(9701): at java.lang.reflect.Method.invokeNative(Native Method) 10-05 16:51:30.808: E/AndroidRuntime(9701): at java.lang.reflect.Method.invoke(Method.java:511) 10-05 16:51:30.808: E/AndroidRuntime(9701): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 10-05 16:51:30.808: E/AndroidRuntime(9701): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 10-05 16:51:30.808: E/AndroidRuntime(9701): at dalvik.system.NativeStart.main(Native Method) 10-05 16:51:30.808: E/AndroidRuntime(9701): Caused by: java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.widget.ProgressBar$SavedState instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/menu_refresh. Make sure other views do not use the same id. 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.view.View.onRestoreInstanceState(View.java:11934) 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.widget.TextView.onRestoreInstanceState(TextView.java:3271) 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.view.View.dispatchRestoreInstanceState(View.java:11910) 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2590) 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2590) 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.view.View.restoreHierarchyState(View.java:11888) 10-05 16:51:30.808: E/AndroidRuntime(9701): at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1634) 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.app.Activity.onRestoreInstanceState(Activity.java:928) 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.app.Activity.performRestoreInstanceState(Activity.java:900) 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1130) 10-05 16:51:30.808: E/AndroidRuntime(9701): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2037) 10-05 16:51:30.808: E/AndroidRuntime(9701): ... 12 more

jom1337 avatar Oct 05 '12 14:10 jom1337

On dev or master?

JakeWharton avatar Oct 05 '12 15:10 JakeWharton

"Wrong state class, expecting View State but received class android.widget.ProgressBar$SavedState instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/menu_refresh. Make sure other views do not use the same id." Hmm

iNoles avatar Oct 05 '12 22:10 iNoles

Can only reproduce with the native action bar. File it at http://b.android.com.

SimonVT avatar Oct 06 '12 11:10 SimonVT

any work around on this issue ? I am also facing the same problem with id/menu_refresh. I have not used it in anywhere else in my code.

rakesh-barik avatar Mar 21 '13 04:03 rakesh-barik