Error inflating layout with java.lang.ClassNotFoundException

前端 未结 2 931
情深已故
情深已故 2021-01-13 15:28

OK now I know that this question has been asked before several times on SO but none of the answers have worked for me.

I am attempting to create a custom preference

相关标签:
2条回答
  • 2021-01-13 16:17

    Generally, you need to use the full path to a component:

    <com.example.ebookreader.ListViewPreference
         android:id="@+id/font_selector"
         android:key="font"
         android:title="Font"
         android:summary="Edit Font"      
    />
    

    I have never seen the use of "Custom:" as an element.

    0 讨论(0)
  • 2021-01-13 16:22

    but why you wrote

     <custom:ListViewPreference 
    

    it should be

     <com.example.ebookreader.ListViewPreference
    

    As your package, where class placed, called

    0 讨论(0)
提交回复
热议问题