question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The Kotlin Gradle plugin was loaded multiple times in different subprojects

See original GitHub issue

Environment

"react": "^17.0.2",
    "react-native": "^0.64.0",
    "react-native-pager-view": "^5.1.7",
    "react-native-unimodules": "^0.13.3",
    "react-native-webview": "^11.4.3"

Description

Getting this error on build:

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-pager-view', ':react-native-webview'

Reproducible Demo

  1. Install react-native-pager-view, and react-native-webview.
  2. Build the app & run react-native run-android

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
KrisLaucommented, Jun 1, 2021

@rajkinkhabwala Nope not yet unfortunately

0reactions
rajkinkhabwalacommented, Jun 27, 2021

@troZee Sorry for the late reply! I just tested it with v5.2.1 but I’m still getting the same error unfortunately

Hey, the app compiles but it’s buggy, if like swipe faster then it starts swiping itself, and it’s annoying so I have to go back to the previous screen and again try it but still works but it is buggy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Android] The Kotlin Gradle plugin was loaded multiple times ...
The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.
Read more >
False positive for `The Kotlin Gradle plugin was loaded ...
The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.
Read more >
Kotlin plugin asks to be added to the root project as well but ...
The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.
Read more >
the kotlin gradle plugin was loaded multiple times in different ...
The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build. This might happen...
Read more >
java - How to configure every Kotlin project in Gradle multi ...
You can reference the Kotlin plugin by its id instead of its type, as follows: allprojects { plugins.withType(JavaPlugin) { // All the stuff ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found