android studio with Java compiler error: string too large to encode using UTF-8 written instead as 'STRING_TOO_LARGE'

后端 未结 16 1289
北恋
北恋 2020-12-03 06:45

When I clean the android project in android studio, the error happen, I have backed to previous commit or different branch, which works find couple days ago, but has this er

16条回答
  •  借酒劲吻你
    2020-12-03 07:07

    None of the above solutions worked for me. What ended up being the cause of the problem was, as it states, a String that was too large. Specifically, in my arrays.xml file under the values directory, I had some SVG arrays that were used within my app and commenting them out solved the issue.

    If you know for certain you have some longer Strings somewhere in your resource directories (/res), check for any large Strings that may be lurking.

    Also, this solution may help others but was not linked to in this thread.

提交回复
热议问题