How to fix the error
R.string.Invalid_city_name
using the method
getstring(R. string.Invalid_city_name)
the same error what is
You need to use getString. It is a part of the COntext class:
status = /*context.*/getString(R.string.Invalid_city_name));
If you are in an activity, writing getString is enough. Otherwise, you need a Context or Activity to reference to.
R.string.* is an integer, and you can't set a String to an Integer like that. You either need to add + ""
or use Integer.toString(int)
So to summarize: