2

i need to add string (from resource) to Database

 <string name="variable_name">AAAAA</string>

Resources.getSystem().getString(R.string.variable_name)

I tried to: -

  1. clean project
  2. fix Android properties
  3. restart Eclipse

In R file variable_name exist. Sorry for my english

4

1 回答 1

1

确保您没有导入android.R.java

你应该这样

String str=getResources().getString(R.string.variable_name);
于 2013-04-30T15:18:13.583 回答