Flutter: FAILURE: Build failed with an exception - android-studio

Since the last update of Android Studio (today is 23th of August 2020), each time I create a new flutter project I can't run it. Even if I do not modify a line of code and only create a blank new project then run it.
All my previous flutter project can be run in my VD without any problem. But I can't work on new projects because of this build failure.
I emptied cache using the menu 'File/Invalidate Caches / Restart ...'
I upgraded Flutter using "flutter upgrade --force' then 'flutter run -v' like in this post but it did not work for me.
I learn flutter via courses online but I don't know what to do to solve this problem.
Do you have a solution ?
Thank you
Here is what happens in the console (with a new flutter application project):
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
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
> Android resource compilation failed
C:\Users\Steeve\Documents\Flutter\androidstudio\proj\boule_app\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml: AAPT: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
C:\Users\Steeve\Documents\Flutter\androidstudio\proj\boule_app\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-hi\values-hi.xml: AAPT: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
C:\Users\Steeve\Documents\Flutter\androidstudio\proj\boule_app\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-de\values-de.xml: AAPT: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
C:\Users\Steeve\Documents\Flutter\androidstudio\proj\boule_app\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-lo\values-lo.xml: AAPT: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
C:\Users\Steeve\Documents\Flutter\androidstudio\proj\boule_app\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-pt\values-pt.xml: AAPT: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
C:\Users\Steeve\Documents\Flutter\androidstudio\proj\boule_app\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-lt\values-lt.xml: AAPT: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
C:\Users\Steeve\Documents\Flutter\androidstudio\proj\boule_app\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-hr\values-hr.xml: AAPT: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
C:\Users\Steeve\Documents\Flutter\androidstudio\proj\boule_app\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-lv\values-lv.xml: AAPT: error: file failed to compile.
* 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 24s
Exception: Gradle task assembleDebug failed with exit code 1

Delete the androidstudio folder from the C:\Users\Steeve\Documents\Flutter\ directory.

Related

flutter gradle task assembleDebug failed

Launching lib/main.dart on Android SDK built for x86 in debug mode...
lib/main.dart:1
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
/home/jerry/.gradle/daemon/5.4.1/Projects/dicee-flutter-master/android/app/src/main/AndroidManifest.xml:29:13-31:63: AAPT: error: resource drawable/launch_backgroung (aka co.appbrewery.dicee:drawable/launch_backgroung) 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.
Get more help at https://help.gradle.org
BUILD FAILED in 23s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
You probably made a typo when trying to modify your AndroidManifest.xml file.
# Bad
drawable/launch_backgroung
# Good
drawable/launch_background

When I am building meta-toolchain-qt5 using yocto I encountered foolowing error

ERROR: qtbase-5.9.2+gitAUTOINC+ec16ba393b-r0
do_prepare_recipe_sysroot: The file /usr/lib/pkgconfig/wayland-egl.pc
is installed by both mesa and imx-gpu-viv, aborting ERROR:
qtbase-5.9.2+gitAUTOINC+ec16ba393b-r0 do_prepare_recipe_sysroot:
Function failed: extend_recipe_sysroot ERROR: Logfile of failure
stored in:
/home/sandeep/fsl-community-bsp/build/tmp/work/cortexa9hf-neon-mx6qdl-poky-linux-gnueabi/qtbase/5.9.2+gitAUTOINC+ec16ba393b-r0/temp/log.do_prepare_recipe_sysroot.2803 ERROR: Task
(/home/sandeep/fsl-community-bsp/sources/meta-qt5/recipes-qt/qt5/qtbase_git.bb:do_prepare_recipe_sysroot)
failed with exit code '1'
mesa and imx-gpu-viv both recipe files are trying to insta the same file /usr/lib/pkgconfig/wayland-egl.pc that is cause the error. Remove the file manually and compile it again .

Execution failed for task ':compileDebugJavaWithJavac'

I cannot build the app after i installed cordova googleMaps. Getting the following error "Execution failed for task ':compileDebugJavaWithJavac'.".
If i uninstall google maps then i would be able to build without any problem .
Complete error:
1 error
:compileDebugJavaWithJavac
FAILED
BUILD FAILED
Total time: 2.676 secs
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
Error: cmd: Command failed with exit code 1 Error output:
D:\Lenus Phase-2\lenus\platforms\android\src\plugin\google\maps\PluginUtil.java:
135: error: cannot access AbstractSafeParcelable
Builder builder = LatLngBounds.builder();
^
class file for com.google.android.gms.common.internal.safeparcel.AbstractSafeP
arcelable not found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova run android (exit code 1).

Build error: java.io.FileNotFoundException After Android Studio2.2.1

Error:Execution failed for task ':library:mergeDebugAndroidTestResources'.
Error: java.io.FileNotFoundException: D:\Project\library\build\intermediates\res\merged\androidTest\debug\drawable-mdpi-v4\abc_scrubber_control_to_pressed_mtrl_000.png (请求的操作无法在使用用户映射区域打开的文件上执行。)
Update gradle version and build success.

Unable to build shaderc with new experimental gradle plugin android studio

I am trying to build shaderc from NDK 12's third party folder. It build properly with "com.android.tools.build:gradle:2.1.3" but gives following error for "com.android.tools.build:gradle-experimental:0.8+"
process_begin: CreateProcess(NULL, "", ...) failed.
C:/SDKL/ndk-bundle/sources/third_party/shaderc/third_party/Android.mk:124: *** target pattern contains no `%'. Stop.
FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':framework:generateJsonModelRelease'.
Build command failed.
Error while executing 'C:\SDKL\ndk-bundle\ndk-build.cmd' with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\GVRVV\GVRf\Framework\framework\src\main\jni\Android.mk NDK_APPLICATION_MK=C:\GVRVV\GVRf\Framework\framework\src\main\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDEBUG=0 APP_PLATFORM=android-19 NDK_OUT=C:\GVRVV\GVRf\tools\Framework\framework.externalNativeBuild\ndkBuild\release\obj NDK_LIBS_OUT=C:\GVRVV\GVRf\tools\Framework\framework\build\intermediates\ndkBuild\release\lib -j4 NDK_DEBUG=1 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -n}
process_begin: CreateProcess(NULL, "", ...) failed.
C:/SDKL/ndk-bundle/sources/third_party/shaderc/third_party/Android.mk:124: *** target pattern contains no `%'. Stop.
Link: https://developer.android.com/ndk/guides/graphics/shader-compilers.html

Resources