您的位置:首页 > 移动开发 > Android开发

android studio著名错误 java.lang.IllegalStateException:

2016-06-23 14:37 387 查看
06-23 14:30:00.825 29540-29540/cn.xweed E/CrashHandler:   ┃\╭╭╭╭╭/┃
                                                          ┃       ┃  

                                                          ┃   ━   ┃

                                                          ┃ ┳┛ ┗┳ ┃糟糕,憋不住拉出来了啦~

                                                          ┃       ┃

                                                          ┃   ╰┬┬┬╯  ┃

                                                          ┃   ╰—╯   ┃ 

                                                          ┗━┓   ┏━┛

                                                            ┃   ┃  

                                                            ┃   ┃ 

                                                            ┃   ┗━━━┓ 

                                                            ┃       ┣━━━━┓ 

                                                            ┃       ┏━━━━┛   ◢

                                                            ┗┓┓┏━┳┓┏┛       ◢◤◢◣

                                                             ┃┫┫ ┃┫┫       ◢◣◢◤█◣

                                                             ┗┻┛ ┗┻┛      ◢█◢◣◥◣█◣

 [main-1][ver:2016-03-29-16]Oh Madan player is crash !!!!!!!!!!!!! 

 java.lang.RuntimeException: Unable to start activity ComponentInfo{cn.xweed/cn.xweed.MyAccountActivity}: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.

这个错误多在Fragment中出现,比如在Fragmeng 中,使用了自定义的正在加载的小图标,
例如:LoadDataView mLoad=new LoadDataView(getActivity(), view);
这时,你在Fragment中的OnCreateView()方法中,返回的就不能是view, 应该是mLoad,如果你还是返回view,就会出现如上边的错误。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  fragment