- Android报“android.content.res.Res
- WARNING: The `android.dexOptions
- Android android:screenOrientati
- The `android.dexOptions.incremen
- AndroidX项目,Android5.0 5.1 加载WebV
- "android-studio undefined refere
- Android7.0调用相机拍照问题
- [✗] Android toolchain - develop
- weex解决安卓9.0etected problem with
- 解决style attribute ‘@android:attr
Android报“android.content.res.Resources$NotFoundException: String resource ID #0x2”错误
当调用setText()方法时如果传入int型是不会被当成内容而是resourceID来使用!
所以报错!
解决方法:TextView.setText("" + arg)
转为String传入即可
android:text="@{String.valueOf(viewModel.savedVendorsCount)}"







网友评论