Android Fragment no view found for ID?

前端 未结 30 1951
逝去的感伤
逝去的感伤 2020-11-22 05:33

I have a fragment I am trying to add into a view.

FragmentManager fragMgr=getSupportFragmentManager();
feed_parser_activity content = (feed_parser_activity)f         


        
30条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-22 06:02

    I got this error when I upgraded from com.android.support:support-v4:21.0.0 to com.android.support:support-v4:22.1.1.

    I had to change my layout from this:

    
    
     
    

    To this:

    
    
    
        
        
    
     
    

    So the layout MUST have a child view. I'm assuming they enforced this in the new library.

提交回复
热议问题