-
Notifications
You must be signed in to change notification settings - Fork 300
Description
Describe the bug
Android builds fail because of an annotations error. I am migrating a react-native project to a monorepo managed with nx. It seems like a misconfiguration related to gradle and linting. The project builds after I remove the @stripe/stripe-react-native package.
This does not occur if I install the package on a new project with the react-native cli.
I have tried tweaking the gradle versions, but continue to run into this. Could someone please provide pointers to resolving this.
> Task :stripe_stripe-react-native:packageDebugResources FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
58 actionable tasks: 2 executed, 56 up-to-date
ERROR:/Users/esfxra/monorepo/apps/test-app/node_modules/@stripe/stripe-react-native/android/src/main/res/layout/googlepay_button_dark.xml: Resource and asset merger: /Users/esfxra/monorepo/apps/test-app/node_modules/@stripe/stripe-react-native/android/src/main/res/layout/googlepay_button_dark.xml is not annotated as @Input
java.lang.IllegalStateException: /Users/esfxra/monorepo/apps/test-app/node_modules/@stripe/stripe-react-native/android/src/main/res/layout/googlepay_button_dark.xml is not annotated as @Input
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':stripe_stripe-react-native:packageDebugResources'.
> /Users/esfxra/monorepo/apps/test-app/node_modules/@stripe/stripe-react-native/android/src/main/res/layout/googlepay_button_dark.xml: Error: is not annotated as @Input
To Reproduce
Steps to reproduce the behavior:
- Run
npm install @stripe/stripe-react-native - Integrate the
<StripeProvider>{...}</StripeProvider>component - Run
npx nx run wifi-app:run-android - See error
This is a repo scaffolded with nx where the error can be reproduced [RN 0.69]:
And this is a repo scaffolded by the react-native cli with no errors [RN 0.69]:
Expected behavior
N/A
Screenshots
N/A
Desktop (please complete the following information):
N/A
Smartphone (please complete the following information):
- Device: Pixel 3
- OS: Android
Additional context
N/A