Let me write here my solution in case it helps somebody else.
After many hours, it turned out that the exception happen in this code:
Type type = new TypeToken<ArrayList<String>>() {}.getType();
I needed that code for using Gson.fromJson() function.
The TypeToken was imported using this:
import com.google.common.reflect.TypeToken;
and I had to changed to:
import com.google.gson.reflect.TypeToken;
Then I faced another error:
RuntimeException: Missing type parameter
And I solved thanks to this answer: https://stackoverflow.com/a/72520577/1363087
In the proguard-rules.pro file I added this:
-keep class com.google.gson.reflect.TypeToken
-keep class * extends com.google.gson.reflect.TypeToken
-keep public class * implements java.lang.reflect.Type
All this made me lose a huge amount of time. I wish I hadn't updated Android Studio or the dependencies.