This class should be public (android.support.v7.internal.widget.ActionBarView.HomeView)

前端 未结 7 1179
予麋鹿
予麋鹿 2020-12-29 04:11

I am trying to create a Android Application which uses 3 spinners. I keep getting this error and I can\'t figure out how to fix it. This class should be public (and

7条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-29 04:52

    Go to appcompat_v7 library -> Properties -> Android Lint Preferences -> Instantiatable -> Select "Warning" severity.

    enter image description here

    Android Lint Checks

    Instantiatable Summary: Ensures that classes registered in the manifest file are instantiatable

    Priority: 6 / 10 Severity: Warning Category: Correctness

    Activities, services, broadcast receivers etc. registered in the manifest file must be "instiantable" by the system, which means that the class must be public, it must have an empty public constructor, and if it's an inner class, it must be a static inner class.

提交回复
热议问题