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

Bug 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'

I looked through old bug reports and it looks like it was fixed in build 10.0.0 but I’m on ^11.4.3 and I’m still getting the error. Not sure if this error only appeared because of expo’s unimodules or if I just never noticed it before. Another open bug report with the same issue is #1968 and a closed one is #2005. #2005 solution seems to be to use an older version but what would I need to if I want the latest version?

To Reproduce:

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

Expected behavior: No build errors

Screenshots/Videos: image

Environment:

  • OS: Android
  • OS version: Pixel 3a API 30
  • react-native version: ^0.64.0
  • react-native-webview version: ^11.4.3

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
cristianoccazinspcommented, Jun 8, 2021

I’m getting the same when combined with https://github.com/agoldis/react-native-mlkit-ocr

0reactions
Bavaria93commented, Dec 7, 2022

Mesmo aqui

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
[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 >
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