React-native-notifee: "app:checkDebugDuplicateClasses FAILED" error appears when running run android

Created on 3 Jun 2020  路  10Comments  路  Source: notifee/react-native-notifee

I just install @notifee/react-native and tried to run 'run-android' command, the error 'app:checkDebugDuplicateClasses FAILED' appears in terminal. I created another blank project with react-native init command and just added my previous package.json file in the new project. still after downloading node_modules, when I ran 'react-native run-android' it show the same error. It might be because of some interdependency of subPackages. I've tried running it without notifee and it runs fine, please have a look at my package.json and help me finding the issue.
package.txt

Most helpful comment

@mikehardy Thanks, that worked! I glossed over that thread initially because I'm not using Android Studio so I thought it wouldn't apply to me, plus I saw that exact dependency in my dependency graph so I didn't think adding it would make any difference, but I'm exhilarated to discover how wrong I was!

All 10 comments

Could you share the entire output please?

@Ehesp this is the entire output I got when I run the command
error.txt

Looks like another package uses an Android dependency which is clashing. You have a lot of other packages installed so finding the cause maybe tricky...

Within your project, could you show the results of: cd android && ./gradlew :app:dependencies

Essentially, this is a similar issue.

Actually, seems like this could be related to Android Studio update... What version are you using? cc https://github.com/notifee/react-native-notifee/issues/68#issuecomment-636350392

@Ehesp I am using android studio 3.5

Could you show the outputs of the gradle list dependencies task then please?

I think I'm having the same issue. It started happening when I upgraded to react-native-firebase v6, but when I remove notifee the problem goes away.
https://gist.github.com/iwikal/870127d6f1d6e8c2a3567b2d8ca5a52d
The duplicated class is com.google.common.util.concurrent.ListenableFuture for me as well.

@iwikal You need this from the linked issue 3 comments above https://github.com/notifee/react-native-notifee/issues/68#issuecomment-636350392

I'm going to close this as it is either resolved for the OP (no one sits on a build error for 22 days!) or resolved with related issues. Future people that hit this: please read linked comments they have actionable solutions, thanks!

@mikehardy Thanks, that worked! I glossed over that thread initially because I'm not using Android Studio so I thought it wouldn't apply to me, plus I saw that exact dependency in my dependency graph so I didn't think adding it would make any difference, but I'm exhilarated to discover how wrong I was!

Was this page helpful?
0 / 5 - 0 ratings