Android studio error after update to 3.6.2 - android-studio

I recently updated my android studio from 3.5 to 3.6.2. After that for all my projects I receive below error even for new projects with clean and empty activity.
Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild UP-TO-DATE
Task :app:compileDebugAidl NO-SOURCE
Task :app:generateDebugBuildConfig UP-TO-DATE
Task :app:compileDebugRenderscript NO-SOURCE
Task :app:javaPreCompileDebug FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:javaPreCompileDebug'.
Could not resolve all files for configuration ':app:debugCompileClasspath'.
Could not find collection.jar (androidx.collection:collection:1.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/collection/collection/1.0.0/collection-1.0.0.jar
Could not find lifecycle-common.jar (androidx.lifecycle:lifecycle-common:2.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-common/2.0.0/lifecycle-common-2.0.0.jar
Could not find core-common.jar (androidx.arch.core:core-common:2.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/arch/core/core-common/2.0.0/core-common-2.0.0.jar
Could not find annotation.jar (androidx.annotation:annotation:1.0.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/annotation/annotation/1.0.0/annotation-1.0.0.jar
Could not find constraintlayout-solver.jar (androidx.constraintlayout:constraintlayout-solver:1.1.3).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/constraintlayout/constraintlayout-solver/1.1.3/constraintlayout-solver-1.1.3.jar
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
2 actionable tasks: 1 executed, 1 up-to-date

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

execution failed for appmergeDebugResources task in intelliJ android project

I am not able to get over this error. I'm using IntelliJ 2020.1.1 and I've tried every suggested solution- upgrading(6.1) and downgrading(both 6.0 and 5.6.4) gradle, changing gradle properties, clean/rebuild etc. Nothing works.
Executing tasks: [:app:assembleDebug] in project D:\MyApplication1
Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild UP-TO-DATE
Task :app:compileDebugAidl NO-SOURCE
Task :app:generateDebugBuildConfig UP-TO-DATE
Task :app:compileDebugRenderscript NO-SOURCE
Task :app:javaPreCompileDebug UP-TO-DATE
Task :app:mainApkListPersistenceDebug UP-TO-DATE
Task :app:generateDebugResValues UP-TO-DATE
Task :app:generateDebugResources UP-TO-DATE
Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
Task :app:extractDeepLinksDebug UP-TO-DATE
Task :app:processDebugManifest UP-TO-DATE
Task :app:mergeDebugShaders
Task :app:compileDebugShaders
Task :app:generateDebugAssets
Task :app:mergeDebugAssets
Task :app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugResources'.
Multiple task action failures occurred:
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
AAPT2 aapt2-3.6.0-rc01-6040484-windows Daemon #3: Daemon startup failed
Please check if you installed the Windows Universal C Runtime.
This should not happen under normal circumstances, please file an issue if it does.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
AAPT2 aapt2-3.6.0-rc01-6040484-windows Daemon #4: Daemon startup failed
Please check if you installed the Windows Universal C Runtime.
This should not happen under normal circumstances, please file an issue if it does.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
AAPT2 aapt2-3.6.0-rc01-6040484-windows Daemon #5: Daemon startup failed
Please check if you installed the Windows Universal C Runtime.
This should not happen under normal circumstances, please file an issue if it does.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
AAPT2 aapt2-3.6.0-rc01-6040484-windows Daemon #6: Daemon startup failed
Please check if you installed the Windows Universal C Runtime.
This should not happen under normal circumstances, please file an issue if it does.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
AAPT2 aapt2-3.6.0-rc01-6040484-windows Daemon #7: Daemon startup failed
Please check if you installed the Windows Universal C Runtime.
This should not happen under normal circumstances, please file an issue if it does.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
AAPT2 aapt2-3.6.0-rc01-6040484-windows Daemon #8: Daemon startup failed
Please check if you installed the Windows Universal C Runtime.
This should not happen under normal circumstances, please file an issue if it does.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
AAPT2 aapt2-3.6.0-rc01-6040484-windows Daemon #9: Daemon startup failed
Please check if you installed the Windows Universal C Runtime.
This should not happen under normal circumstances, please file an issue if it does.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
AAPT2 aapt2-3.6.0-rc01-6040484-windows Daemon #10: Daemon startup failed
Please check if you installed the Windows Universal C Runtime.
This should not happen under normal circumstances, please file an issue if it does.
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 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.4.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 33s
11 actionable tasks: 4 executed, 7 up-to-date`
It worked after installing Universal C Runtime.
I was getting "The update is not applicable to your computer" message everytime I tried to install CRT. Turns out Service pack 1 was not installed on my system. CRT was installed after this update and my project also executed finally.

Android Studio says FAILURE: Build failed with an exception after updating to 3.6.2

All my codes was running fine. But When I updated the android studio to 3.6.2 it show:
Executing tasks: [:app:assembleDebug] in project /home/AK_47/AndroidStudioProjects/MyProject
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:mainApkListPersistenceDebug UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Could not resolve all files for configuration ':app:_internal_aapt2_binary'.
> Could not resolve com.android.tools.build:aapt2:3.6.2-6040484.
Required by:
project :app
> No cached version of com.android.tools.build:aapt2:3.6.2-6040484 available for offline mode.
> No cached version of com.android.tools.build:aapt2:3.6.2-6040484 available for offline mode.
* 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
5 actionable tasks: 1 executed, 4 up-to-date
I was trying to make an ANDROID application. But after updating it isn't working. Any solution?
Try to turn off Gradle Offline mode from Gradle tool located at right side of Android Studio.
then please follow below steps:
Run following command to clear gradle cache:
rm -rf ~/.gradle/caches/
after that please click on Invalidate Caches/Restart from File menu then further processing will happen which dowloads all the libraries again so it takes time but also resolves this issue.
The error indicates that the dependency can't be downloaded because you are in offline mode or have an active Internet connection is not available.
Steps to try
Try to turn Off Gradle's offline mode. You are turn off by
View > Tool Windows > Gradle
from the menu bar.Here On the top of the Gradle window ,click on Toggle Offline Mode button in the Gradle window.
Check the internet connection and build again.
Hope this answer will help...
At Gradle I used
rm -rf ~/.gradle/
Then gradle clean build
And ./gradlew test

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

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

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)

Resources