Solution skill
Android Build failing on :app:mergeExtDexDevDebug
Complete solution
Shows how to fix android Build failing on :app:mergeExtDexDevDebug. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Android Build failing on :app:mergeExtDexDevDebug What was going on Issue RevenueCat/react-native-purchases#1266 (closed, 14 comments): - [x] I have updated Purchases SDK to the latest version - [x] I have read the Contribution Guidelines - [x] I have searched the Community - [x] I have read docs.revenuecat.com - [x] I have searched for existing Github issues Describe the bug A clear and concise description of what the bug is.
Steps
- Android Build failing on :app:mergeExtDexDevDebug
- What was going on
Issue RevenueCat/react-native-purchases#1266 (closed, 14 comments): - [x] I have updated Purchases SDK to the latest version - [x] I have read the Contribution Guidelines - [x] I have searched the Community - [x] I have read docs.revenuecat.com - [x] I have searched for existing Github issues Describe the bug A clear and concise description of what the bug is.
- The fix
If your Android build fails at :app:mergeExtDexDevDebug after adding react-native-purchases-ui, it is an Android Gradle Plugin 7 bug (a null pointer exception that was only fixed in AGP 8). The reporter's fix, confirmed by the maintainer: apply the buildscript workaround from Google issue tracker 342522142 comment 8 to your root build.gradle. Upgrading the SDK alone will not help, since your React Native version pins AGP 7.
When to use
You are seeing this: Upgrading the SDK alone will not help, since your React Native version pins AGP 7. Use this skill when you run into "Android Build failing on :app:mergeExtDexDevDebug".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://github.com/RevenueCat/react-native-purchases/blob/main/CONTRIBUTING.md
- https://community.revenuecat.com
- https://docs.revenuecat.com/
- https://github.com/RevenueCat/react-native-purchases/issues
Evidence
In gh:RevenueCat/react-native-purchases#1266 the issue was: Issue RevenueCat/react-native-purchases#1266 (closed, 14 comments): - [x] I have updated Purchases SDK to the latest version - [x] I have read the Contribution Guidelines - [x] I have searched the Community - [x] I have read docs.revenuecat.com - [x] I have searched for existing Github issues Describe the bug A clear and concise description of what the bug is. The verified answer: If your Android build fails at :app:mergeExtDexDevDebug after adding react-native-purchases-ui, it is an Android Gradle Plugin 7 bug (a null pointer exception that was only fixed in AGP 8). The reporter's fix, confirmed by the maintainer: apply the buildscript workaround from Google issue tracker 342522142 comment 8 to your root build.gradle. Upgrading the SDK alone will not help, since your React Native version pins AGP 7. Source: https://github.com/RevenueCat/react-native-purchases/issues/1266
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_ukI29UtdSWxZob8mxsxfTQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Android Build failing on :app:mergeExtDexDevDebug <span>— Vectle</span></a>