Solucionar error en React Native Expo: The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.

Tiempo de lectura: < 1 minuto

Hoy vamos a aprender a solucionar un error que aparece al crear un nuevo proyecto con Expo y TypeScript.

Este error es:

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_dslThe Kotlin plugin was loaded in the following projects: ':expo', ':expo-modules-core'> Task :app:compileDebugJavaWithJavac FAILED

Este error suele producirse por que el nombre del paquete es distitno entre app/build.gradle y nuestro proyecto expo en app.json

Tenemos que abrir app/build.gradle y poner el proyecto con el nombre correcto, applicationId debe coincidir con namespace:

Y ya debería funcionar correctamente.

Deja un comentario