skip to Main Content

Im trying to run a react-native project on the android emulator from Android Studio. However whenever I run npx expo run:android I get a few errors:

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: ':expo', ':expo-av', ':react-native-gesture-handler', ':react-native-safe-area-context', ...

> Task :app:compileDebugJavaWithJavac FAILED
error: cannot find symbol
        return BuildConfig.DEBUG;

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

I’ve tried many different post suggestions, cleaning the gradle, adjusting the versions, and much more to no avail.

It might be worth mentioning that IOS runs completely fine.

2

Answers


  1. Chosen as BEST ANSWER

    Just figured this out. My Namespace in android -> app -> build.gradle was somehow SLIGHTLY different then the other package names. Make sure these all are the same.


  2. Build Error when running npx expo run:android
    i was also facing this issue, and finally finding here and their i found that my build.gradle file have issue, i posted complete solution here, i hope it will help you, Thanks
    check my answer here
    enter link description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search