How to put a "-" in string.xml file

So, when you read the error message, your answer will be that you have to replace - with –. Then it should work fine =)

http://en.wikipedia.org/wiki/Dash


The other answers are OK for when you want to display the string to the user. The user can't really tell the difference between a "real" dash and the unicode trickery.
But, if you really must have the dash (e.g. because that string is used as a password somewhere, or as a url key for an API) then you can just 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 string can be read using the regular:

getResources().getString(R.string.EVA_API_KEY);