I have:
Toast.makeText(NewChatActivity.this, getString(R.string.invitation_sent_prompt, contact), Toast.LENGTH_SHORT).show();
(contact, is a String variable, as well as subForm ) and:
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() {
....}
In both places, the getString
is launching an error:
Format String XXX is not a valid format string so it should be not passed to String.format
The resource looks like:
<string name="invitation_sent_prompt"> Invitation has been sent to <xliff:g id="user">%1$s</xliff:g>.</string>
.
The worst, is that the project was on Eclipse, and after the migration to AndroidStudio, is launching this error.
Where is the problem on getString?