ここに単純な Android アプリケーションがありますが、R.java ファイルにあるため、エラーの解決策を保存できません。元に戻し続けるだけで、変更したものを保存できません。
これが私が取り組んでいるコードです。音声ボタンへの単純なテキストです。
private TextToSpeech talker;
private ImageButton imageButton1;
private TextView text;`
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.abc);
talker = new TextToSpeech(this,this);
imageButton1 = (ImageButton) findViewById(R.id.imageButton1);
text = (TextView) findViewById(R.id.text);
text.setText("A");
imageButton1.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
String strText2 = text.getText().toString();
if (strText2.length()>0)
{ say(strText2); }
}
});`
text = (TextView) findViewById(R.id.text);
R.javaファイルに保存されるはずのリソースIDが見つからないため、エラーが発生しました。私の問題は、タイプidでフィールドテキストを作成する提案された解決策をクリックするたびにエラーがなくなり、保存すると元に戻ることです。