Open simonarcher opened 1 week ago
Hey @simonarcher
What version of React Native, Expo(if any), Android Studio, Java, Gradle Wrapper you are using?
In 2.1.0 we have specified jvmTarget
. It was intended to fix exactly the issue you are getting 😅
@descorp thanks for the quick reply!
So to answer your questions
0.74.3
Android Studio Hedgehog | 2023.1.1 Patch 2
17.0.10
(not sure how to check.. but attached a screenshot)distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
networkTimeout=10000
validateDistributionUrl=true
hm.. tomorrow I will try to replicate your setup to see if I can reproduce this issue.
In a meanwhile, could you try removing following lines from ../node_modules/@adyen/react-native/android/build.gradle
:
kotlinOptions {
jvmTarget = "1.8"
}
cool will give that a try in the meantime and let you know the results... :)
Hey guys
I also had a same issue with latest version and had to remove that part that is added to be able to build android app.
Removed this as a temp solution and after that i can build the app again:
kotlinOptions {
jvmTarget = "1.8"
}
hm.. tomorrow I will try to replicate your setup to see if I can reproduce this issue. In a meanwhile, could you try removing following lines from
../node_modules/@adyen/react-native/android/build.gradle
:kotlinOptions { jvmTarget = "1.8" }
Yeah can also confirm removing this has allowed me to compile the app successfully with no issues. ☺️
Thanks @devic021 @simonarcher 💚
We will investigate how to make this work for everyone!
I have the same issue but then with
'compileDebugJavaWithJavac' task (current target is 17) and 'compileDebugKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.
Expo SDK 50
Thanks @zegenerative
We observe this problem for RN 74+ and working on making support for both old and new versions.
Released 2.1.1. It should resolve the issue and provide "some" backward compatibility
@descorp
Thanks, i will test it right away!
I am using following package configuration, but still getting this error.
"@adyen/react-native": "2.1.1",
"react": "18.2.0",
"react-native": "0.72.6",
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':adyen_react-native:compileDebugKotlin'.
Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (1.8) and 'compileDebugKotlin' (17).
Consider using JVM Toolchain: https://kotl.in/gradle/jvm/toolchain Learn more about JVM-target validation: https://kotl.in/gradle/jvm/target-validation
Hey @viru-rathore
This is the opposite error :)
If we keep jvmTarget = "1.8"
:
Inconsistent JVM-target compatibility detected for tasks 'compileReleaseJavaWithJavac' (17) and 'compileReleaseKotlin' (1.8).
If we remove it:
Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (1.8) and 'compileDebugKotlin' (17).
Could you check if 2.1.0 will work for you?
Consider using JVM Toolchain
Unfortunately, to use Gradle toolchain support, one must use the Android Gradle plugin (AGP) version 8.1.0-alpha09 or higher. As you might know default gradle version for RN is 7.3.1
Could you list your:
FYI I can confirm that our latest "Adyen Android SDK" only works on React-Native 0.73+ due to android target limitation.
To make this work for RN 0.72 and below, one needs to:
compileTarget
to 34
Describe the bug At the moment I have the
@adyen/react-native
package of2.0.1
running fine.However, when I try and update to the latest
2.1.0
of the package I get the following error when trying to compile my Android applicationAnd Im not entirely sure how to resolve this.
my
build.gradle
file looks like thisAnd this only seems to be happening on
2.1.0
update and2.0.1
seems fine, and I cant seem to identify in breaking change or updates I may need to do from the release notes.any help or guidance on this would be most appreciated! :)
thanks!