I have a live react native app, which was working fine. But now I need to made some changes to it but I am unable to do so after new updates and new gradle version. I have tried on multiple PCs and workspaces but all are of no use same error on every system pops up. giving some errors which are as under and attached screenshot.
FAILURE: Build failed with an exception.
The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build. This might happen in subprojects that apply the Kotlin plugins with the Gradle 'plugins { ... }' DSL if they specify explicit versions, even if the versions are equal. Please add the Kotlin plugin to the common parent project or the root project, then remove the versions in the subprojects. If the parent project does not need the plugin, add 'apply false' to the plugin line. See: https://docs.gradle.org/current/userguide/plugins.html#sec:subprojects_plugins_dsl The Kotlin plugin was loaded in the following projects: ':react-native-alarm-clock', ':react-native-webview'
- What went wrong: Execution failed for task ':invertase_react-native-apple-authentication:compileDebugKotlin'.
Screenshot of the error another Screenshot of the error
I have a live react native app, which was working fine. But now I need to made some changes to it but I am unable to do so. I have tried on multiple PCs and workspaces but all are of no use same error on every system pops up.
CodePudding user response:
add kotlin version in you android/build.gradle
buildscript {
ext {
...
kotlin_version='1.6.0' //add This change version with your installed kotlin version
...
}
repositories {
google()
mavenCentral()
}
dependencies {
...
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" //add This
...
}
}
CodePudding user response:
Just go to build.gradle(Project:yourProjectName)
change
Plugin {
...
id 'org.jetbrains.kotlin.android' version '1.4.x' apply false
...
}
To
Plugin {
...
id 'org.jetbrains.kotlin.android' version '1.6.0' apply false
...
}