Talk about it, all right?
Has anyone used the Gson library in the same project where the SDK was used?
The problem happened when I used the Facebook SDK to allow in-app login through the Facebook account. This routine also worked perfectly, but it does Gson bugar.
In practice, I'm using the following dependencies in my Gradle:
compile 'com.facebook.android:facebook-android-sdk:4.8.1'
compile 'com.google.code.gson:gson:2.7'
In the code, the error happens when I try to instantiate Gson, in this line:
Gson g = new Gson();
And the error that happens is this:
Caused by: java.lang.VerifyError: com/google/gson/Gson
I've done a lot of research and found people with similar errors, so I understand the SDK SDK also uses Gson, so this conflict happens. Some solutions I found for this type of problem are as follows, but none of them solved my problem:
Add mavenCentral () in the repositories: I already did but did not solve it.
repositories {
mavenCentral()
}
Give an "exclude" in Gson's Facebook SDK: also tried and did not work.