{"action":"opened","issue":{"url":"https://api.github.com/repos/iielse/SwitchButton/issues/10","repository_url":"https://api.github.com/repos/iielse/SwitchButton","labels_url":"https://api.github.com/repos/iielse/SwitchButton/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/iielse/SwitchButton/issues/10/comments","events_url":"https://api.github.com/repos/iielse/SwitchButton/issues/10/events","html_url":"https://github.com/iielse/SwitchButton/issues/10","id":277277613,"number":10,"title":"Parcel android.os.Parcel@7c1d390: Unmarshalling unknown type code 2131296439 at offset 1204","user":{"login":"g19980115","id":25760230,"avatar_url":"https://avatars1.githubusercontent.com/u/25760230?v=4","gravatar_id":"","url":"https://api.github.com/users/g19980115","html_url":"https://github.com/g19980115","followers_url":"https://api.github.com/users/g19980115/followers","following_url":"https://api.github.com/users/g19980115/following{/other_user}","gists_url":"https://api.github.com/users/g19980115/gists{/gist_id}","starred_url":"https://api.github.com/users/g19980115/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/g19980115/subscriptions","organizations_url":"https://api.github.com/users/g19980115/orgs","repos_url":"https://api.github.com/users/g19980115/repos","events_url":"https://api.github.com/users/g19980115/events{/privacy}","received_events_url":"https://api.github.com/users/g19980115/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-28T06:55:28Z","updated_at":"2017-11-28T06:55:28Z","closed_at":null,"author_association":"NONE","body":"大神啊，Parcel 写法不规范，我找了一个上午的问题...\r\n添加describeContents和CREATOR 可以解决问题\r\n完整修改如下：\r\n```Java\r\n static final class SavedState extends BaseSavedState {\r\n        private boolean isOpened;\r\n\r\n        SavedState(Parcelable superState) {\r\n            super(superState);\r\n        }\r\n\r\n        private SavedState(Parcel in) {\r\n            super(in);\r\n            isOpened = 1 == in.readInt();\r\n        }\r\n\r\n        @Override\r\n        public void writeToParcel(Parcel out, int flags) {\r\n            super.writeToParcel(out, flags);\r\n            out.writeInt(isOpened ? 1 : 0);\r\n        }\r\n\r\n        //必须\r\n        @Override\r\n        public int describeContents() {\r\n            return 0;\r\n        }\r\n        //必须\r\n        public static final Creator<SavedState> CREATOR = new Creator<SavedState>() {\r\n            @Override\r\n            public SavedState createFromParcel(Parcel in) {\r\n                return new SavedState(in);\r\n            }\r\n\r\n            @Override\r\n            public SavedState[] newArray(int size) {\r\n                return new SavedState[size];\r\n            }\r\n        };\r\n    }\r\n```"}}
{"actor":{"display_login":"g19980115"}}