Open pierroo opened 2 years ago
hi, same problem here. did you find any solution?
I simply brought my react-native-iap version down to ^7.5.3 and the issue went away. :) Seems like they started using kotlin on v8.+
I just found a solution by upgrading kotlin version to 1.5.10
I have faced on the same issue. I tried to use kotlin 1.5.10 but failed still. Please let me know if someone finds a good solution. Thanks
try kotlin 1.5.31
Upgrade your kotlin plugin in react-native:
Go to android/build.gradle
and change the following line:
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:<latest-version-here>"
I am still Facing this issue. can anyone help me please
I am still Facing this issue. can anyone help me please
I'm afraid it's too late, but here's a patch file that works for me:
diff --git a/node_modules/react-native-iap/android/build.gradle b/node_modules/react-native-iap/android/build.gradle
index e636116..e84eb99 100644
--- a/node_modules/react-native-iap/android/build.gradle
+++ b/node_modules/react-native-iap/android/build.gradle
@@ -9,7 +9,7 @@ buildscript {
dependencies {
classpath "com.android.tools.build:gradle:7.4.2"
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.0"
}
}
diff --git a/node_modules/react-native-iap/android/gradle.properties b/node_modules/react-native-iap/android/gradle.properties
index b8db382..c5483c9 100644
--- a/node_modules/react-native-iap/android/gradle.properties
+++ b/node_modules/react-native-iap/android/gradle.properties
@@ -1,4 +1,4 @@
-RNIap_kotlinVersion=1.7.21
+RNIap_kotlinVersion=1.6.0
RNIap_minSdkVersion=21
RNIap_targetSdkVersion=31
RNIap_compileSdkVersion=31
When having both this package and react-native-iap, we cannot build for android, we get the following error:
=> react-native-pager-view is using kotlin v1.4.0 react-native-iap is using kotlin v1.5.0
I tried changing my android/build.gradle with:
But unfortunately the issue remains the same. Anyone managed to fix this? :/