Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0
错误原因:在setText()中使用了int型的参数
pay.setText(getString(R.string.dollar)+getIntent().getIntExtra("Amount",0));
发现即使使用了getString也会出现这种情况,所以修改添加
pay.setText(getString(R.string.dollar)+""+getIntent().getIntExtra("Amount",0));
或者
pay.setText(getString(R.string.dollar)+String.valueOf(getIntent().getIntExtra("Amount",0)));
1万+




被折叠的 条评论
为什么被折叠?



