getContext() doesn't exist

前端 未结 4 1755
Happy的楠姐
Happy的楠姐 2021-02-20 12:29

So I have been going through the Android Developer training on the official site and there is a point where they want us to finally instantiate our database.

So they te

4条回答
  •  名媛妹妹
    2021-02-20 13:03

    The View class does have a getContext method.

    You either have a typo, or your code is not located in a non-static method of a sub-class of View.

提交回复
热议问题