The Kotlin Gradle plugin was loaded multiple times in different subprojects
See original GitHub issueBug 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:
- Install react-native-pager-view, and react-native-webview.
- Build the app & run react-native run-android
Expected behavior: No build errors
Screenshots/Videos:
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:
- Created 2 years ago
- Reactions:8
- Comments:10 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m getting the same when combined with https://github.com/agoldis/react-native-mlkit-ocr
Mesmo aqui