1

I am in the very big beginning of learning how to make apps. I would like to add Courgette Regular to my TextView. While pasting font to the Assets Folder I got message: "File was loaded in the wrong encoding 'UTF-8'. What can I do to fix my problem?

enter image description here

Sanjeet
  • 2,385
  • 1
  • 13
  • 22
Marzena
  • 13
  • 1
  • 5
  • What do you expect to see when viewing a font file in Android Studio? The question is, does it work in your app? – ShadowGod Oct 12 '16 at 18:49
  • Good point! My app didn't work but I fixed that. – Marzena Oct 14 '16 at 06:04
  • I have a same problem like yours. You can read this, and fix it. Use local history :D Right-click the file -> Local history -> Show History. https://stackoverflow.com/questions/29883232/how-do-i-restore-my-project-to-an-older-version-in-android-studio [Screenshot](https://i.stack.imgur.com/0olo1.png) – Leguna Sep 14 '19 at 08:26

3 Answers3

1

I was having the same problem a couple of days ago,

Here is how to fix it:

  1. Go to File -> Settings -> File Types.
  2. Find the file type that you have linked the .ttf files to (in my case it was a text file)
  3. Deactivate it with the red minus sign on the right hand side.

The next time you'll try to import a .ttf file in Android Studios there will be a popup menu where:

  • You can select Android Studios to read the .ttf files as a certain filetype
  • You can select the program that normally reads .ttf on your computer (The button on the bottom of the menu).

Hoped this helped!

Cedias
  • 904
  • 10
  • 19
CameraGuy
  • 11
  • 1
1

1) First of Go to your project location and zip copy of your android project. 2) Paste This zip file to another location 3)Than import this project on android studio.

0

Please try this:

  1. Goto your current android project location
  2. Zip file creates of your carpeted application project
  3. UnZip or Extract this project to another location
  4. Import this android project in android studio
  5. Then working fine your project
help-info.de
  • 6,695
  • 16
  • 39
  • 41