私は持っている:
Toast.makeText(NewChatActivity.this, getString(R.string.invitation_sent_prompt, contact), Toast.LENGTH_SHORT).show();
( contact は String 変数であり、 subForm も同様です) および:
new AlertDialog.Builder(NewChatActivity.this).setTitle(getString(R.string.subscriptions))
.setMessage(getString(R.string.subscription_prompt, subFrom))
.setPositiveButton(R.string.approve_subscription, new DialogInterface.OnClickListener() {
....}
両方の場所で、getString
エラーが発生しています。
Format String XXX is not a valid format string so it should be not passed to String.format
リソースは次のようになります。
<string name="invitation_sent_prompt"> Invitation has been sent to <xliff:g id="user">%1$s</xliff:g>.</string>
.
最悪なのは、プロジェクトが Eclipse 上にあり、AndroidStudio への移行後にこのエラーが発生することです。
getString のどこに問題がありますか?