Search Issue Tracker
Active
Votes
21
Found in
2021.3.40f1
2022.3.38f1
6000.0.11f1
Issue ID
UUM-76723
Regression
Yes
[Android] Build fails with Error "A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable" when using In-App Purchasing and Facebook SDK
Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Scenes/SampleScene.unity” Scene
3. Switch to Android Platform
4. Build
Expected result: Build finishes successfully
Actual result: Build fails with Error “A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable“
Reproducible with: 4.12.0 (2022.3.38f1), 4.12.2 (2021.3.40f1, 2022.3.38f1, 6000.0.11f1)
Not reproducible with: 4.11.0 (2022.3.38f1)
Testing environment: Windows 10 Enterprise 21H2, macOS 14.5 23F79 Darwin 23.5.0
Not reproducible on: No other environment tested
Notes:
- Reproducible only when Facebook SDK is added
- Reproducible with Mono and IL2CPP
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Select Preset "None" icon changes after switching tabs
- [Android] Crash when using xxHash3 and targeting the ARMv7 Architecture with IL2CPP Scripting Backend
- GameObject reference in a Script Component becomes missing when unpacking a variant of another Prefab variant
- Project Settings vertical separator position is not synchronized with the mouse position when dragging it horizontally
- Crash on PhysicsDebugDraw::SelectFiltering::Update when entering play mode with Physics Debug window docked and unfocused
mageec
Sep 04, 2024 07:55
Hello I had this problem , but i find a workaround i hope it will work for you
my solution is to build manually from Android Studio
My configuration:
Unity 2022.3.44f LTS
Google Play Games Plugin 0.14 and Facebook SDK integrated
Android Studio 2022.2.1 Flamingo
App Release KeyStore ready
Windows 10
1. Upgrade IAP to version 4.12.x (I used 4.12.2): Windows -> Package Manager -> Find "In App Purchasing" and upgrade it to 4.12.0 (or later)
2. Delete Resolved libraries (probably not needed): Assets-> External Dependency Manager -> Android Resolver -> Delete Resolved Libraries
3. Force Resolve: Assets-> External Dependency Manager -> Android Resolver -> Force Resolve
4.Open Player Settings :File -> Build Settings->Player Settings
5.Select Custom Main manifest,Custom Launcher manifest , target API 34 or later and make other config related to your game
6. Open Build Settings :File -> Build Settings and check the export checkbox
7. Click on the export Button ,select the target folder to generate the android studio project
8.Open Android studio in Administrator mode
9. Open the target folder export project with android studio
10. After gradle sync, open the file build.gradle of unitylibrary module
11. you will see a the end of the file this line :
afterEvaluate {
dependencies {
implementation 'com.android.billingclient:billing:6.2.1'
}
}
12. replace it by:
afterEvaluate {
dependencies {
implementation ('com.android.billingclient:billing:6.2.1'){
exclude group: 'androidx.core', module: 'core'
exclude group: 'androidx.activity', module: 'activity'
exclude group: 'androidx.annotation', module: 'annotation'
exclude group: 'androidx.arch.core', module: 'core-runtime'
exclude group: 'androidx.collection', module: 'collection'
exclude group: 'androidx.customview', module: 'customview'
exclude group: 'androidx.fragment', module: 'fragment'
exclude group: 'androidx.lifecycle', module: 'lifecycle-common'
exclude group: 'com.google.android.gms'
}
}
}
13:In Android Studio Select Build Variant :Build-> Select build variant and select release
14:In Android studio Build-> Generate Bundle Signed/Apk and select your keytore,put the password and build the game
in my configuration it works, i hope if you have almost the same config as me, it will fix the problem too Thanks
Logan_Elaire
Aug 26, 2024 22:27
Finally managed to get it working by switching the target API Level in Player Settings from 35 to 34... I'm free at last...
Logan_Elaire
Aug 26, 2024 03:23
Can't build for Android either since I updated IAP. Probably because of the Firebase libraries. I tried every solution I've found online and nothing's worked.
This is seriously frustrating, because not only is the deadline this week, I also have an actual important update to release which is already ready to roll for iOS.
I've asked for an extension on the deadline, which I'd suggest others do, because I doubt this issue is getting resolved in the next few days... Just go to your app on the Developper Console and go to Policy status. There, you should have the deadline listed: you can click it and ask for an extension to November 1st. Should at least take off SOME of the pressure... though I'd rather this problem was just fixed!
The IAP update should have come far sooner so there was time to iron out the kinks, not like, two months before the deadline. Is this gonna be the same next year, when 6.2 becomes outdated?
iris_ch
Aug 25, 2024 14:38
As @musicdeveloper already stated, the issue is not limited to Facebook SDK.
For us, the issue occurs in combination with the Google Play Games Plugin, after upgrading the Unity IAP to 4.12.2
Many thanks to @unity_psBBuKYnBt2RIg ! After trying several things, we finally solved the issue by following your steps!
unity_psBBuKYnBt2RIg
Aug 21, 2024 20:04
I finally managed to solve the problem. The solution that worked for me:
1. Upgrade IAP to version 4.12.x (I used 4.12.2): Windows -> Package Manager -> Find "In App Purchasing" and upgrade it to 4.12.0 (or later)
2. **Delete everything under Assets/ExternalDependencyManager/Editor** <- This is very important. This is the step that I missed and because of this I was not able to build the project
3. Install the latest version of External Dependency Manager (I used 1.2.182)
4. Restart Unity
5. Delete Resolved libraries (probably not needed): Assets-> External Dependency Manager -> Android Resolver -> Delete Resolved Libraries
6. Force Resolve: Assets-> External Dependency Manager -> Android Resolver -> Force Resolve
7. Build
8. Drink that well-deserved beer
unity_psBBuKYnBt2RIg
Aug 21, 2024 19:10
Why is this issue completely ignored? There are tons of forums with this issue and no valid solution.
pavlostenoff
Aug 21, 2024 16:53
google billing deadline very soon - need fix now pls.
musicdeveloper
Aug 21, 2024 16:47
This issue is not isolated to the Facebook SDK.
I am experiencing this same duplicate build failure with a third party video recording framework that has never had any issues until Unity IAP 4.12
The deadline for Google Play Billing 6 is in a few days, we need a fix now!
ihamza301
Aug 19, 2024 07:49
Any update on this issue?
Any workaround?
The google deadline for IAP update is approaching really fast.