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
Solution
Add classpath("com.facebook.react:react-native-gradle-plugin") in android/build.gradle dependencies
Related
I started getting this error after the last update.
FAILURE: Build failed with an exception.
Where: Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line:
912
What went wrong: A problem occurred evaluating root project 'android'.
A problem occurred configuring project ':app'.
Could not create task ':app:packLibsflutterBuildDebug'.
> No signature of method: org.gradle.api.tasks.bundling.Jar.destinationDir() is applicable for
argument types: (File) values:
[C:\Users\gurka\OneDrive\Belgeler\GitHub\projectname\build\app\intermediates\flutter\debug]
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
BU�LD FAILED in 2s
I tried flutter clean e.g
flutter run -v result
When I am running my react-native app it gives me these errors:
1: Task failed with an exception.
-----------
* Where:
Build file 'C:\Users\malik.usman\Desktop\Malik Usman\React Native Projects\MyApp\android\app\build.gradle' line: 2
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not find implementation class 'com.facebook.react.ReactPlugin' for plugin 'com.facebook.react' specified in jar:file:/C:/Users/malik.usman/.gradle/caches/jars-9/20363358361f313985ae969d544ea93f/react-native-gradle-plugin.jar!/META-INF/gradle-plugins/com.facebook.react.properties.
* 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
BUILD FAILED in 13s
My App Verisons are:
react-native: "0.71.0"
react: "18.2.0"
My newly build react-native project not running.
These are the errors when running "npx react-native run-android"
rror 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:
Script '/home/modou/Desktop/northcoders/projects/test-RN/Bot-Spotter/node_modules/expo-modules-autolinking/scripts/android/autolinking_implementation.gradle' line: 272
What went wrong:
A problem occurred evaluating project ':expo'.
A problem occurred configuring project ':expo-modules-core'.
Failed to notify project evaluation listener.
> NDK at /home/modou/Android/Sdk/ndk/21.1.6352462 did not have a source.properties file
> Could not get unknown property 'release' for SoftwareComponentInternal set of type org.gradle.api.internal.component.DefaultSoftwareComponentContainer.
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 ':expo'.
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.
==============================================================================
native and am having trouble building my android version which is giving me the error bellow and i couldnt find anything about it with the newer versions of react-native-webview
ty in advance
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file 'D:\Users\Volxen\Desktop\port\tv\node_modules\react-native-webview\android\build.gradle' line: 35
* What went wrong:
A problem occurred evaluating project ':react-native-webview'.
> Failed to apply plugin 'kotlin-android'.
> Malformed \uxxxx encoding.
* 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 ':react-native-webview'.
> com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle
I had been able to build and run the react-native project in my old intel based mac successfully. Recently I migrated my project to the apple silicon and now I'm having issues building and running react-native project on m1 mac. When I run the npx react-native run-android I get below error message in the console:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file '/Users/sussol/Documents/Git/mobile/android/app/build.gradle' line: 120
* What went wrong:
A problem occurred evaluating project ':app'.
> ../package.json (No such file or directory)
* 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
BUILD FAILED in 2m 4s
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 '/Users/sussol/Documents/Git/mobile/android/app/build.gradle' line: 120
* What went wrong:
A problem occurred evaluating project ':app'.
> ../package.json (No such file or directory)
* 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
I tried various things to get it working like cleaning gradle, using different build tools versions etc. But none of them worked. Does anybody has any idea what's going on here? Any help would really be appreciated. Thanks.