Skip to content
Advertisement

i can’t reference a String that exists

Im trying to run this code:

gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                .requestIdToken(getString(R.string.default_web_client_id))
                .requestEmail()
                .build();

but the R.string.default_web_client_id part isnt working (Cannot resolve symbol ‘default_web_client_id’).

i know that the ‘default_web_client_id’ string exists, but it isnt at the String XML, its in a generated ‘values.xml’

print of the values.xml and the path to it

am i doing something wrong or it should be working?

Advertisement

Answer

I think your app will not going to crash anywhere. Just Android Studio’s IDE will produce that error. You can ignore that.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement