plaid / react-native-plaid-link-sdk

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

Unsupported class file major version 61 #688

Open shivprakash86 opened 1 week ago

shivprakash86 commented 1 week ago

The problem

When adding plaid link sdk getting below log error.

Environment

Plaid Link React Native 11.11.0
ReactNative Version 0.66.0
Occurs on Android yes
compileSdkVersion 34
targetSdkVersion. 34

Logs

Execution failed for task ':app:mergeExtDexDevelopmentDebug'.

Could not resolve all files for configuration ':app:developmentDebugRuntimeClasspath'. Failed to transform sdk-core-4.4.2.aar (com.plaid.link:sdk-core:4.4.2) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=31, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. Execution failed for DexingNoClasspathTransform: /Users/sysquare/.gradle/caches/transforms-3/0ea9df81af535f6f792a9eae3a5560fd/transformed/jetified-sdk-core-4.4.2-runtime.jar. Error while dexing.

hroland commented 2 days ago

@shivprakash86 sounds very similar to what im running into as well. did you find any fixes?

melissaosullivan commented 1 day ago

Hi there,

This looks similar to this thread: https://github.com/react-native-community/cli/issues/1719. I would try the suggestion in this comment:

You could fix it by changing the 'gradle-wrapper.properties' file with the following line: distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-milestone-1-all.zip

If that doesn't resolve the issue, try downgrading your Java version and ensure that it matches the compatible version listed in the link below: Compatibility Matrix

The Plaid Android SDK is using Java 17 compatible byte code, so the fix depends on which versions of gradle and java you are using, but the key is aligning them to something that matches in the compatibility matrix and is above or at Java 17.