how to fix this error?? > Task :app:installDebug FAILED - android-studio

I want to run React Native application. Did everything in order as described in the official documentation React Native
I was reading a possible problem when creating an AVD manager and in settings just need to choose "use host GPU". Since I have an android studio version of 3.4 GPU settings I did not find and found and chose Hardware-Gles 2.0 but the error still remained.
info JS server already running.
info Installing the app...
Task :app:installDebug 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.4.1/userguide/command_line_interface.html#sec:command_line_warnings
27 actionable tasks: 2 executed, 25 up-to-date
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:installDebug'.
com.android.builder.testing.api.DeviceException: No connected devices!
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 7s
error Failed to install the app. Make sure you have an Android emulator running or a device connected. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:installDebug'.
com.android.builder.testing.api.DeviceException: No connected devices!
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 7s
at checkExecSyncError (child_process.js:616:11)
at execFileSync (child_process.js:634:15)
at runOnAllDevices (/Users/obaranni/Anastasiia/react/AwesomeProject/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:75:39)
at buildAndRun (/Users/obaranni/Anastasiia/react/AwesomeProject/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/index.js:137:41)
at /Users/obaranni/Anastasiia/react/AwesomeProject/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/index.js:103:12
at processTicksAndRejections (internal/process/task_queues.js:82:5)
at async Command.handleAction (/Users/obaranni/Anastasiia/react/AwesomeProject/node_modules/#react-native-community/cli/build/cliEntry.js:160:7)

Related

FAILURE: Build completed with 2 failures. 1: Task failed with an exception

FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
Where:
Script 'E:\New folder\Candy Crush\CordovaLib\cordova.gradle' line: 68
What went wrong:
A problem occurred evaluating project ':app'.
No installed build tools found. Install the Android build tools version 19.1.0 or higher.
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.
==============================================================================
FAILURE: Build completed with 2 failures.
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 1s

FAILURE: Build failed with an exception. creating node js apps

I'm using cordova to create apps and when I used the command
cordova build android I got this error through the CLI:
c:\Apps\projeto_1>cordova build android
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Users\Max\AppData\Local\Android\Sdk (DEPRECATED)
Using Android SDK: C:\Program Files (x86)\Android\android-sdk
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Starting Daemon
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 7s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
Where:
Script 'C:\Apps\projeto_1\platforms\android\CordovaLib\cordova.gradle' line: 75
What went wrong:
A problem occurred evaluating script.
No usable Android build tools found. Highest 30.x installed version is 29.0.3; minimum version required is 30.0.3.
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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 3s
Command failed with exit code 1: c:\Apps\projeto_1\platforms\android\gradlew cdvBuildDebug -b c:\Apps\projeto_1\platforms\android\build.gradle
Example of build failure: Build failed with an exception.
Where:
Script 'C:\Apps\projeto_1\platforms\android\CordovaLib\cordova.gradle' line: 75
What went wrong:
A problem occurred evaluating script.
No usable Android build tools found. Highest 30.x installed version is 29.0.3; minimum version required is 30.0.3.
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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 3s
Command failed with exit code 1: c:\Apps\projeto_1\platforms\android\gradlew cdvBuildDebug -b c:\Apps\projeto_1\platforms\android\build.gradle

Error on build and run flutter project after reinstall windows

when i install new windows on my computer and install and configure android studio unfortunately my project that i have build on previous windows got error on below and i don't know what is about?
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:signingConfigWriterDebug'.
> java.nio.file.AccessDeniedException:
E:\Project\Mobile_App\store\build\app\intermediates\signing_config\debug\out\signing-config.json
* 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 6s
Finished with error: Gradle task assembleDebug failed with exit code 1

:app:recordFilesBeforeBundleCommandDebug FAILED

Hello I am trying to run an application react-native on a remote desktop
when I run ./gradlew clean it is build successfully.
However I have an error when running ./gradlew assembleDebug
Error: ENOENT: no such file or directory, open 'C:\Users\user\AppData\Local\Temp;C:\Users\user\AppData\Local\Android\Sdk\platform-tools\adb.exe\CodePushResourcesMap-aab77707.json'
:app:recordFilesBeforeBundleCommandDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:recordFilesBeforeBundleCommandDebug'.
> Process 'command 'node'' 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.
BUILD FAILED
Total time: 10 mins 1.501 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
Redirect to android folder and then use gradlew clean.
1.cd android
2.gradlew clean
I resolved this issues by using this comment

Android Gradle dependency compile doesn't work with Java 9

Friends,
I was trying to run gradle command (mentioned below) to resolve dependencies
gradlew -q dependencies app:dependencies --configuration compile
I am using JDK9 and and using gradle 4.4 but when run above mentioned command getting an error.
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring project ':app'.
Failed to notify project evaluation listener.
javax/xml/bind/annotation/XmlSchema
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 20s
Please help me on this.
It is an Android SDK problem with Java 9: Failed to run sdkmanager --list (Android SDK) with Java 9

Resources