How to set up UTF-8 in Android Studio?

Asked

Viewed 3,125 times

4

This error appeared in Android Studio. Is there any setup to fix?

Error:(85, 69) error: unmappable Character for encoding UTF-8

1 answer

6


You can solve this problem in two ways:

  1. convert the file to utf-8
  2. put the correct type of encoding in your build.Radle script.

To convert the file, click the menu, right down in your IDE. Select the correct type of encoding (type used autalmente), then press "Reload", select UTF-8 and press convert.

For the second solution, put the correct type of encoding, in your build.Radle, as follows:

android {
    ...
    compileOptions.encoding = 'windows-1251' // coloque seu encoding atual aqui
    ...

That one blog is very interesting too. I recommend reading.

  • If the answer is correct, please make the necessary marking :).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.