javaandroidandroid-studiojava-compiler-api

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


When I clean the android project in android studio, the error happens. I have backed to previous commit or different branch, which worked fine couple days ago, but has this error now.

I have checked this question and there are no large images or strings added to my project. STRING_TOO_LARGE String in Kotlin


Solution

  • For the time being, you can downgrade Gradle version to resolve this issue. Use gradle 3.1 version like 3.1.3 below.

      classpath 'com.android.tools.build:gradle:3.1.3'