Open martinamatbigfoot opened 1 year ago
Hello. The cause of the problem is that the ANRWatchdog-release package already contains the gson library. I am already working on a solution to this problem.
The same ( Any fixes?
We have the same issue here, is there maybe a fix already available or any chance for getting the source to the native jar implementation so we could compile ourself? Thanks!
Any fix?
I was able to build once but now I receive this duplicate class error.
I'm also encountering this issue.
Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class com.google.gson.ExclusionStrategy found in modules jetified-ANRWatchdog-release-runtime (:ANRWatchdog-release:) and jetified-gson-2.8 (com.google.code.gson:gson:2.8.8)
Duplicate class com.google.gson.FieldAttributes found in modules jetified-ANRWatchdog-release-runtime (:ANRWatchdog-release:) and jetified-gson-2.8 (com.google.code.gson:gson:2.8.8)
Duplicate class com.google.gson.FieldNamingPolicy found in modules jetified-ANRWatchdog-release-runtime (:ANRWatchdog-release:) and jetified-gson-2.8 (com.google.code.gson:gson:2.8.8)
Duplicate class com.google.gson.FieldNamingPolicy$1 found in modules jetified-ANRWatchdog-release-runtime (:ANRWatchdog-release:) and jetified-gson-2.8 (com.google.code.gson:gson:2.8.8)
Duplicate class com.google.gson.FieldNamingPolicy$2 found in modules jetified-ANRWatchdog-release-runtime (:ANRWatchdog-release:) and jetified-gson-2.8 (com.google.code.gson:gson:2.8.8)
...
Using this fork works: https://github.com/hexiy/Unity-ANR-Watchdog
I imported the package and tried to build but I got an error with many classes duplicated like the following:
Duplicate class com.google.gson.internal.Excluder$1 found in modules jetified-ANRWatchdog-release-runtime.jar (:ANRWatchdog-release:) and jetified-gson-2.8.9.jar (com.google.code.gson:gson:2.8.9)
How can I fix this?