plaid / react-native-plaid-link-sdk

Plaid Link for React Native
MIT License
167 stars 119 forks source link

./gradlew app:bundleRelease Build failed #640

Closed showtan001 closed 1 month ago

showtan001 commented 4 months ago

The problem

./gradlew app:bundleRelease Build failed

Environment

Plaid Link React Native e.g. 11.0.0
ReactNative Version e.g. 0.64.4
Occurs on Android e.g. yes

Steps to Reproduce

execute ./gradlew app:bundleRelease

Info:

> Task :app:mergeGooglePlayReleaseAssets FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeGooglePlayReleaseAssets'.
> Could not resolve all files for configuration ':app:googlePlayReleaseRuntimeClasspath'.
   > Failed to transform sdk-core-4.0.0.aar (com.plaid.link:sdk-core:4.0.0) to match attributes {artifactType=android-assets, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for JetifyTransform: /Users/abon/.gradle/caches/modules-2/files-2.1/com.plaid.link/sdk-core/4.0.0/3a393c60253e96e3475e02ab32a45d39af4535a8/sdk-core-4.0.0.aar.
         > Failed to transform '/Users/abon/.gradle/caches/modules-2/files-2.1/com.plaid.link/sdk-core/4.0.0/3a393c60253e96e3475e02ab32a45d39af4535a8/sdk-core-4.0.0.aar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 61. (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).

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 45s
76 actionable tasks: 4 executed, 72 up-to-date
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Expected Result

Build react-native-plaid-link-sdk@10.8.0 successful, but Build 11.0.0 failed.

dtroupe-plaid commented 3 months ago

Hi @showtan001

Thanks for reporting the issue. The error Unsupported class file major version 61. usually means there is an incompatibility with gradle or the Java JDK. Without more information about the error (stacktrace) and your setup (gradle version, etc) it's difficult to provide assistance.

Note that version 10.8.0 is using Android SDK version 3.14.0 and version >= 11.0.0 are using Android SDK >= 4.0.0. This means 11.0.0 is using Kotlin 1.8 and compiles with SDK version 34. You can find more information about our Android SDK here. I suspect the incompatibility is related to these changes.