Android resource not found exception?

前端 未结 9 670
一生所求
一生所求 2020-11-28 12:11

I am having a strange problem using findViewById(id). It comes back with resource not found even though the resource is definitely there. It is a textview in a layout next t

9条回答
  •  孤城傲影
    2020-11-28 12:51

    Make sure you don't set any attributes programmaticly which are not available. I had the very same problem and the reason was a RemoteView.setFloat(id,"setWeight",1.0f); to a LinearLayout, which was not supported with Android before 4.x Unfortunately the error message was not very helpful on this.

提交回复
热议问题