Execution failed for task ':react-native-gradle-plugin:compileKotlin' - android

1 actionable task: 1 executed
e: D:\IMG\React-Native\ReactNativeProject\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\tasks\BundleHermesCTask.kt: (137, 11): This declaration is experimental and its usage must be marked with '#kotlin.ExperimentalStdlibApi' or '#OptIn(kotlin.ExperimentalStdlibApi::class)'
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-gradle-plugin:compileKotlin'.
Compilation error. See log for more details
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 40s
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.bat app:installDebug -PreactNativeDevServerPort=8081
e: D:\IMG\React-Native\ReactNativeProject\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\tasks\BundleHermesCTask.kt: (137, 11): This declaration is experimental and its usage must be marked with '#kotlin.ExperimentalStdlibApi' or '#OptIn(kotlin.ExperimentalStdlibApi::class)'
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-gradle-plugin:compileKotlin'.
Compilation error. See log for more details
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 40s
at makeError (D:\IMG\React-Native\ReactNativeProject\node_modules\execa\index.js:174:9)
at D:\IMG\React-Native\ReactNativeProject\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (D:\IMG\React-Native\ReactNativeProject\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:82:7)
at async Command.handleAction (D:\IMG\React-Native\ReactNativeProject\node_modules\#react-native-community\cli\build\index.js:108:9)
info Run CLI with --verbose flag for more details.

Related

Error React Native > Could not find method provided() for arguments [com.facebook.react:react-native:+]

I npm install react-native-video-player after then, When I restarted the application, I encountered this error
BU�LD FAILED in 23s
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.bat app:installDebug -PreactNativeDevServerPort=8082
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\zekican.aydin\test\psikoyorum-mobile\node_modules\react-native-video\android\build.gradle' line: 20
What went wrong:
A problem occurred evaluating project ':react-native-video'.
Could not find method provided() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
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 23s
at makeError (C:\Users\zekican.aydin\test\psikoyorum-mobile\node_modules\#react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at C:\Users\zekican.aydin\test\psikoyorum-mobile\node_modules\#react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (C:\Users\zekican.aydin\test\psikoyorum-mobile\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\zekican.aydin\test\psikoyorum-mobile\node_modules\#react-native-community\cli\build\index.js:192:9)

Can not build the android application after upgrading to flutter 3.0

Command: flutter run --flavor dev --no-sound-null-safety
FAILURE: Build failed with an exception.
Where:
Script '/Users/petodavid/Developer/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1156
What went wrong:
Execution failed for task ':app:compileFlutterBuildDevDebug'.
Process 'command '/Users/petodavid/Developer/flutter/bin/flutter'' finished with non-zero exit value 1
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 12s
Exception: Gradle task assembleDevDebug failed with exit code 1
I also created a github issue: https://github.com/flutter/flutter/issues/103578

Execution failed for task ':app:compileFlutterBuildDebug' Issue , flutter.gradle' line: 1070

FAILURE: Build failed with an exception.
Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 780
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
java.lang.NullPointerException (no error message)
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 3s
Finished with error: Gradle task assembleDebug failed with exit code 1
Delete your pubspec.lock, and press Pub Get in your pubspec.yaml, upgrade pub, upgrade package(--major-version--)
This should fix the problem.

validateSigningDebug error when I try to run the default flutter app

FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:validateSigningDebug'.
java.util.concurrent.ExecutionException: com.android.builder.utils.SynchronizedFile$ActionExecutionException: java.io.IOException: com.android.ide.common.signing.KeytoolException: Failed to create keystore.
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 1m 33s
Exception: Gradle task assembleDebug failed with exit code 1

When I try to execute project with React native I get the following problem

I have all the environment variables configured correctly, and I have this error
Task :app:processDebugResources FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
82 actionable tasks: 3 executed, 79 up-to-date
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
Could not read path 'C:\Users\Antonio\Desktop\Proyectos\Personales\meissaa-app-mad\android\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\appcompat'.
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 58s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
Could not read path 'C:\Users\Antonio\Desktop\Proyectos\Personales\meissaa-app-mad\android\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\appcompat'.
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 58s
at checkExecSyncError (child_process.js:629:11)
at execFileSync (child_process.js:647:13)
at runOnAllDevices (C:\Users\Antonio\Desktop\Proyectos\Personales\meissaa-app-mad\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
at buildAndRun (C:\Users\Antonio\Desktop\Proyectos\Personales\meissaa-app-mad\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at then.result (C:\Users\Antonio\Desktop\Proyectos\Personales\meissaa-app-mad\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12)
at process._tickCallback (internal/process/next_tick.js:68:7)

Categories

Resources