-1

I am creating an Android app and while extracting the String resources for all the Strings, I am getting an error.

So I thought about it and figured out that we are getting the String by accessing the R file and when I checked app > build > generated > source >, the R file was missing. I also have checked the string.xml file and the String is also getting created over there, hence I thought the issue is with the R file.

For example, while converting the String Date of birth:

getString(R.string.dob);

It says that dob symbol is not resolvable even though I extracted its (Date of Birth) String resource and had the resource named to dob.

Timisorean
  • 1,388
  • 7
  • 20
  • 30
  • 3
    Possible duplicate of ["cannot resolve symbol R" in Android Studio](https://stackoverflow.com/questions/17054000/cannot-resolve-symbol-r-in-android-studio) – Tamir Abutbul Jan 27 '19 at 15:57
  • 1
    The op of that question is not able to find R .. in my case i'm not able to find R as well as the string resource by which i'm accessing it . Like in the above line my question, 'dob' is not resolvable.however , i'll try it . thanks for helping :) – Talha Chafekar Jan 27 '19 at 16:03

1 Answers1

0

In the latest versions of Android Studio the following works:

Tools -> Android -> Sync Project with Gradle Files It worked for me.

Pankaj Yadav
  • 93
  • 1
  • 11