Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

[React Native][0.71] Plugin with id 'com.facebook.react' not found

Plugin with id 'com.facebook.react' not found.

1: Task failed with an exception.

  • Where: Build file 'android/app/build.gradle' line: 2

  • What went wrong: A problem occurred evaluating project ':app'.

Plugin with id 'com.facebook.react' not found.

==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 3s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file 'android/app/build.gradle' line: 2

* What went wrong:
A problem occurred evaluating project ':app'.
> Plugin with id 'com.facebook.react' not found.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':app'.
> compileSdkVersion is not specified. Please add it to build.gradle

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org
like image 554
Harry Kim Avatar asked Nov 18 '25 01:11

Harry Kim


2 Answers

Solution

Add classpath("com.facebook.react:react-native-gradle-plugin") in android/build.gradle dependencies

enter image description here

like image 83
Harry Kim Avatar answered Nov 19 '25 14:11

Harry Kim


In an Expo project, the problem was outdated packages for my Expo version. Running npx expo install --fix worked for me.

like image 23
dve.exe Avatar answered Nov 19 '25 15:11

dve.exe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!