EAS Build fails for Android: react-native-payments failure

Hi, I’m trying to use react-native-purchases. This guide says it should work, and it is working for iOS (the build succeeded, and I’m able to make purchases in my iOS dev-client).

However, trying the analogous build for Android fails.


The gradlew task that is failing is:

The error shows:

* What went wrong:
Execution failed for task ':react-native-payments:compileDebugJavaWithJavac'.

I found on SO that a similar failure was caused by the React Native version not being aligned with Grade version.

The build command I ran for EAS was:
eas build --profile development --platform android

Here is my eas.json > development configuration:

"build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal"

you are encountering this issue with the library: Android: package android.support.annotation does not exist · Issue #216 · naoufal/react-native-payments · GitHub

you should use stripe’s official library instead. see this pinned topic on react-native-payments: 👉 Stripe React Native Official SDK 👉 · Issue #335 · naoufal/react-native-payments · GitHub

more info: Stripe - Expo Documentation

edit: also wanted to point out that you said react-native-purchases in your description of the issue and react-native-payments in the title, and you used react-native-payments in the build. so you may want to make sure you have the libraries sorted out in your head

Thanks! You’re right I just got the names mixed up. I thought one was using the other. Removing the one with the issue fixed it.