Giter Club home page Giter Club logo

Comments (6)

wwzww avatar wwzww commented on July 17, 2024

java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.

from dropdownmenu.

ptrtony avatar ptrtony commented on July 17, 2024

现在我项目中都是用的这段代码 没出现java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
有可能是你的子View没有移除干净导致的 你在检查下

from dropdownmenu.

ptrtony avatar ptrtony commented on July 17, 2024

或者调用的时候直接判断containerView有没有子View 如果有调用)containerView.removeAllViews();应该也是可以的

from dropdownmenu.

androidty avatar androidty commented on July 17, 2024

java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
你可以看下你add的view是不是同一个引用

from dropdownmenu.

NanaGithub avatar NanaGithub commented on July 17, 2024

java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.

出现同样的问题,加了以上判断也没用。大概是添加的 子view本身存在父容器吧。比如 SmartRefreshLayout,这种问题该怎么解决。

from dropdownmenu.

NanaGithub avatar NanaGithub commented on July 17, 2024

#1

看到这个,终于理解了,我的布局是在xml中,这样的话就很不方便了,看来得换种方式了。

from dropdownmenu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.