My file strings.xml
looks like the following:
<resources>
<string name="app_name">BootIntervals</string>
<string name="action_settings">Settings</string>
<string name="logname">"bi2.log"</string>
</resources>
and later I call a method
logger.init(R.string.logname);
which takes a String
as argument. However, I get the following error:
Error:(21, 15) error: method init in class MyLogger cannot be applied to given types;
required: String
found: int
reason: actual argument int cannot be converted to String by method invocation conversion
It does not matter if I use bi2.log
or "bi2.log"
in strings.xml
. What do I make wrong this time? I do not understand why R.string.logname
is an integer...