Click File → Preferences (or press Ctrl + Alt + S ) and find File Encodings in your Android studio. See the image below for help.
You now have three options.
- Change the project encoding according to UTF-8, since Gradle and Android Lint use this (recommended),
- or change the IDE encoding to match a different encoding,
- or just ignore the warning. If this still works, it will continue to work anyway.
http://shrani.si/f/3V/p7/5xt1uxV/encoding.png
As soon as you see a warning, you can immediately click "Open file encoding settings", as shown in the figure below. This will lead you to the same place as described above.

You can also see the current encoding of your file in the lower right corner of Android Studio. You can also change it there. See image below.

You can also specify charset in your build.gradle script, like this
android { ... compileOptions { encoding "UTF-8" sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } }
According to Ashl7 comment , you need to do Gradle sync for this to work
Bojan Kseneman May 03 '15 at 10:05 a.m. 2015-05-03 10:05
source share