开发者

My react native android app is not running/working after new updates of android studio

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 开发者_如何学JAVAfor 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.


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
        ...
    }
}


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
...
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜