Resources NotFoundException?

前端 未结 10 1708
清歌不尽
清歌不尽 2020-11-27 19:01

I\'m getting crash reports from android marketplace:

android.content.res.Resources$NotFoundException: Resource ID #0x....

I get about 17 of

10条回答
  •  时光说笑
    2020-11-27 19:35

    I got this exception:

    Resources$NotFoundException: String resource ID
    

    when I was using setText with an int value. I had to convert it to String.

    Before:

    myTextView.setText(obj.SomeIntProperty);    
    

    After:

    myTextView.setText(String.valueOf(obj.SomeIntProperty));
    

提交回复
热议问题