Android View inflateException

后端 未结 1 1800
误落风尘
误落风尘 2021-01-14 01:00

I\'m trying to create a custom view - finger paint, and I\'m having trouble with this error and I don\'t know how to fix it. Can anybody tell me what is wrong?

LogCa

1条回答
  •  孤独总比滥情好
    2021-01-14 01:37

    From the posted Logcat output:

    Caused by: android.view.InflateException: Binary XML file line #9: 
                                               Error inflating class com.boenka.mk.DrawPanel
    ....
    ....
    Caused by: java.lang.ClassNotFoundException: com.boenka.mk.DrawPanel
    

    It seems that you have accidentally misspelled the custom view's name in your xml layout file:

    
    

    See if changing com.boenka.mk.DrawPanel to com.boenka.mk.DrawingPanel fixes the problem.

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