I implemented AWS chime into my react native project. As mentioned here I had to add below configs into my project.
build.gradle
file changes
buildscript {
ext.kotlin_version = '1.3.71'
...
dependencies {
...
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
app/build.gradle
file changes
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.3'
implementation 'androidx.core:core-ktx:1.1.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
When I configured these changes and after yarn android
(build) my build is failing with .kt
file error in node_modules
.
e: /projects/rndemo/node_modules/expo/android/src/main/java/expo/modules/ExpoModulesPackage.kt: (27, 9): Type inference failed: Not enough information to infer parameter T in fun <T> emptyList(): List<T>
Please specify it explicitly.
e: /projects/rndemo/node_modules/expo/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt: (48, 12): Type inference failed: fun <T, A> invokeDelegateMethod(name: String, argTypes: Array<Class<*>>, args: Array<A>): T
cannot be applied to
(String,Array<Class<*>>,Array<String?>)
Without above configuration changes application works fine.
What is the reason for this ?
Is there a way to skip node modules being compiled with specified kotlin version ?