0

When I am building my project at visual studio 2019 at windows or Mac then the following error occurs. "string too large to encode using UTF-8 written instead as 'STRING_TOO_LARGE'. The error is occurs at Visual studio 2019 16.7.7 for windows. But this error is not happening at visual studio 2017. But I need to compile my project to visual studio 2019. Project properties is given at below screenshot https://prnt.sc/zpbX_vz0gY7U.

I have xml files at resource folder but they are mot more than 2 KB/file.

  • https://stackoverflow.com/questions/52229987/android-studio-with-java-compiler-error-string-too-large-to-encode-using-utf-8 – pm100 Mar 21 '22 at 04:25

1 Answers1

0

It turns out that some characters inside the files are exceeding the maximum length.Please try to find out these characters and manage to truncate them.Use this PowerShell script.

Refer to this thread.

Alexandar May - MSFT
  • 6,536
  • 1
  • 8
  • 15