android.content.res.Resources$NotFoundException: String resource ID #0x37

    xiaoxiao2021-03-26  30

    最近开发中遇到的小问题,2017年新的开始记录点滴;

    错误描述: android.content.res.Resources$NotFoundException: String resource ID #0x37

    当时我还纠结为什么找不到.

    原因:参数 int resId错误,你把String赋值给int的resId,所以编译器找不到正确的Resource于是报错。

    解决方法: 我要他变成String类型,我就懒,就在int值后面直接加+" ",强制转换为String.方便快捷就是这么任性.

    转载请注明原文地址: https://ju.6miu.com/read-663781.html

    最新回复(0)