は、すべてがOKです:私のコードで文字列リソースを抽出するには?私はこのようなパラメータとして文字列を追加すると
mPages[0] = new Page(
R.drawable.page0,
"On your return trip from studying Saturn's rings, you hear a distress signal that seems to be coming" +
" from the surface of Mars. It's strange because there hasn't been a colony there in years. " +
"Even stranger, it's calling you by name: \"Help me, %1$s, you're my only hope.\"",
new Choice("Stop and investigate", 1),
new Choice("Continue home to earth", 2));
しかし、私はこのような文字列リソースを抽出しようとすると、エラーにあり
mPages[0] = new Page(
R.drawable.page0,
.getString(R.string.story_page0),
new Choice("Stop and investigate", 1),
new Choice("Continue home to earth", 2));
だから何をすべき私がやります?
あなた
String.xml
ファイルに「停止および調査」と「地に家を続ける」などのすべての文字列を使用すると、エラーが発生した正確に何を説明できることを確認してください? – PiKostyr 'getResources()。getString(R.string.story_page0);' – Mohit
「page0」の後に ')'が表示されます – Rubit