I am trying to update a 3-year-old Android app and in the process convert from Eclipse to Android Studio. I am also new to android development. I am having troubles with the R files. I have tried the help tips here,here, and here (which aren't all that different I realize). I am referencing strings.
Here is the method:
private void setDefaultSettings() {
SettingsFragment.SETTING_KEY = getResources().getString(R.string.default_key);
}
default_key is in my strings.xml file:
<resources>
<string name="default_key">Key1</string>
</resources>
I have tried to:
- Clean and build the project
- Clean, sync gradle, build project
- Modify xml files, clean, sync gradle, build
- Including android.R.string, clean, sync gradle, build
What am I missing here?