Norne9 / Unity-ANR-Watchdog

This package will allow you to reduce the number of ANRs of your application.
Other
9 stars 5 forks source link

Duplicated classes in modules. #1

Open martinamatbigfoot opened 1 year ago

martinamatbigfoot commented 1 year ago

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?

Norne9 commented 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.

bborik commented 1 year ago

The same ( Any fixes?

szeleneyr commented 1 year ago

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!

noamriahi commented 1 year ago

Any fix?

okanseref commented 1 year ago

I was able to build once but now I receive this duplicate class error.

p0w1nd commented 7 months ago

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)
...
p0w1nd commented 7 months ago

Using this fork works: https://github.com/hexiy/Unity-ANR-Watchdog