Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 happen, I have backed to previous commit or different branch, which works find couple days ago, but has this error now. I have checked this question and there is not large image or strings added for my project. STRING_TOO_LARGE String in Kothlin

like image 704
Xianwei Avatar asked Sep 07 '18 21:09

Xianwei


2 Answers

I had encountered the same and fixed by clear the build cache .

like image 56
Kalu Khan Luhar Avatar answered Sep 21 '22 18:09

Kalu Khan Luhar


I was stuck on this problem and read through this topic and no one provided a future solution. I did NOT want to revert back my Gradle. Therefore, here is the link to the updated dependencies https://github.com/stripe/stripe-android. Look for the "Android Studio (or Gradle)" section and you should see this "implementation 'com.stripe:stripe-android:8.1.0'" also you might need to add "-keep class com.stripe.android.** { *; }" if you are enabling minification in your build.gradle file.

Overall Stripe has stopped updating their own "Stripe docs" which can be found here. To give them credit their docs are helpful and should be read at least once, but be mindful that most of the docs are out date when I wrote this...

Hope this helps :)

like image 37
ILMTL Avatar answered Sep 19 '22 18:09

ILMTL