Custom Layout Inflation with Fragments in Robolectric not working

后端 未结 4 1149
刺人心
刺人心 2021-01-12 10:34

When inflating a layout in a Fragment, with the LayoutInflater, i am getting this exception:

 ./res/layout/locations_list.xml line #-1 (sorry, not yet implem         


        
4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-12 11:18

    In my case I got this problem when I had this in my app:

        
            com.google.android
            support-v4
            r13
        
    

    but this in my unittest project:

        
            com.google.android
            support-v4
            r7
        
    

    The older version of the support library I used in the tests didn't contain the class I was trying to use (android.support.v4.widget.DrawerLayout).

提交回复
热议问题