Search Issue Tracker
By Design
Votes
33
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
-
scar027
Sep 23, 2024 06:56
Updating EDM4U to latest version (steps 2 and 3 from unity_psBBuKYnBt2RIg) and setting Min Target API to 24 solves all my issues!
-
RSH1
Sep 19, 2024 13:58
This issue also happens with the Unity Ironsource Levelplay SDK included
-
Weendie-Games
Sep 09, 2024 20:18
I had the same problem and the step-by-step mentioned by @unity_psBBuKYnBt2RIg fixed for me. Thanks.
-
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 StudioMy 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 101. 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.
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note:
Solved by resolving dependencies with EDM4U (External Dependency Manager for Unity).
For details, see the first solution here: https://discussions.unity.com/t/iap-4-12-0-solutions-to-android-build-issues/1503523