Other answers are fine if you want to display the string to the user. The user cannot tell the difference between a βrealβ dash and a Unicode trick.
But if you really need to have a dash (for example, because this line is used as the password somewhere or as the url key for the API), you can simply use this format:
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="TypographyDashes"> <string name="EVA_API_KEY">3c42b725-5e20-41c8-982f-dee40be8a05b</string> </resources>
The warning will be removed and the line can be read using regular:
getResources().getString(R.string.EVA_API_KEY);
Tal Weiss Jun 05 '12 at 10:18 2012-06-05 10:18
source share