a.p.
a.p.

Reputation: 3288

Strange exception in application

I have recently put an application on the Market and I have received until now 7 errors that look like the following:

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/0x2. Make sure other views do not use the same id.

Can someone tell me how to debug the problem? What is View with id 0x2 - is there a way to find out?

Upvotes: 8

Views: 1586

Answers (2)

Aru S
Aru S

Reputation: 1529

I've received this error under the following conditions - I'm replacing the icon of an item in the actionbar (in my case a throbber for a refresh button), and while it's in that state, I rotate the device. This error arises from it trying to restore the view's saved state and noticing the difference between what's declared and what's serialized.

Upvotes: 3

whlk
whlk

Reputation: 15635

There should be a stacktrace next to the report which could help you find the exact line of code.

Upvotes: 1

Related Questions