Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails when using stripe-terminal-react-native on Expo SDK 50 and RN 0.73.6 #669

Closed
itbeginswithi opened this issue Apr 12, 2024 · 2 comments
Assignees

Comments

@itbeginswithi
Copy link

Describe the bug
I've just updated my app from Expo v.49 & RN 0.72.6 to Expo v.50 & RN 0.73.6, and now my local Android build is failing with the following exception.

C:\Users\lenovo\Desktop\uberclone\node_modules\@stripe\stripe-terminal-react-native\android\src\main\java\com\stripeterminalreactnative\listener\RNReaderReconnectionListener.kt:32:18: warning: this declaration overrides deprecated member but not marked as deprecated itself. This deprecation won't be inherited in future releases. Please add @Deprecated annotation or suppress. See https://youtrack.jetbrains.com/issue/KT-47902 for details
    override fun onReaderReconnectStarted(reader: Reader, cancelReconnect: Cancelable) {
                 ^

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform jackson-core-2.16.1.jar (com.fasterxml.jackson.core:jackson-core:2.16.1) to match attributes {artifactType=enumerated-runtime-classes, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for JetifyTransform: C:\Users\lenovo\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.16.1\9456bb3cdd0f79f91a5f730a1b1bb041a380c91f\jackson-core-2.16.1.jar.
         > Failed to transform 'C:\Users\lenovo\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.16.1\9456bb3cdd0f79f91a5f730a1b1bb041a380c91f\jackson-core-2.16.1.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 65. (Run with --stacktrace for more details.)
           Suggestions:
            - Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.    
            - If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).

To Reproduce
Steps to reproduce the behavior:

  1. init an expo app: npx create-expo-app StickerSmash
  2. add @stripe/stripe-terminal-react-native
  3. build the app using: npx expo run android
    => Build fails with an exception

Expected behavior
A clear and concise description of what you expected to happen.

Stripe Terminal React Native SDK version
^0.0.1-beta.17

Smartphone (please complete the following information):

  • Device: Android Emulator API 34
  • JDK: 17.0.1
  • Gradle 8.3
  • minSdkVersion: 26
  • targetSdkVersion: 34

Additional context
Following the migration of an Expo app to Expo 50, my attempts to build the application were unsuccessful, due to issues with stripe-terminal-react-native SDK. I cross-referenced the Expo 50 changelog and confirmed that I'm using the recommended SDK versions for compatibility with the latest release. Updating the react-stripe-terminal SDK may be necessary to align with the changes introduced in RN 0.73;

React Native 0.73 changed from Java to Kotlin for Android Main* classes: MainApplication.java/MainActivity.java are now MainApplication.kt/MainActivity.kt. If you depend on any config plugins that use dangerous modifications to change these files, they may need to be updated for SDK 50 support.

@nazli-stripe
Copy link
Collaborator

Did you take a look at #653 Issues with jackson-core are coming from an upgrade in the Terminal Android SDK and the solution is to disable jetifier. Let me know if that fixes it

@nazli-stripe nazli-stripe self-assigned this Apr 12, 2024
@itbeginswithi
Copy link
Author

It works, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants