Error:Execution failed for task ':app:packageDebug' - android

I get this error when trying to rebuild project after generating User Interface tests using Android Test recorder plugin for Android studio (http://droidtestlab.com/).
Every time I have to relaunch Android studio and Emulator to Get rid of this error.
Tried cleaning project then got this error,
Information:Gradle tasks [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]
:clean
:app:clean FAILED
Error:Execution failed for task ':app:clean'.
> Unable to delete file: E:\..\AndroidStudio\..\app\build\outputs\apk\app-debug.apk
Information:BUILD FAILED
Is this a bug or what am I doing wrong here?
How can I fix this error?
Using Android studio 2.1.1 and Android 6.0, Nexus 5X API 23 emulator

Related

React Native: Task :app:installDebug FAILED

I am working on MAC, trying to run React Native on android but it throws this error: Task :app:installDebug FAILED. This is the full error:
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.5/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:
A problem was found with the configuration of task ':app:installDebug'.
> File '/Users/vinaysharma/Library/Android/sdk/platform-tools/adb' specified for property 'adbExe' does not exist.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8088
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':app:installDebug'.
> File '/Users/vinaysharma/Library/Android/sdk/platform-tools/adb' specified for property 'adbExe' does not exist.
I've tried reinstalling Android Studio twice as well as creating a new project for RN but that didn't help me out.
I tried this as well: brew cask install android-platform-tools. Thanks.
You need to install adbExe. Please follow steps in this link

Flutter returns Execution failed for task ':app:transformClassesWithDexBuilderForDebug' as soon as I add packages

I want to make an Android app with Flutter that uses the firebase ml kit to perform text recognition on images. I have successfully added firebase to my flutter project, but as soon as I add the packages image_picker: 0.6.1+4 and firebase_ml_vision: 0.9.2+1 I get the following error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\mathi\.gradle\caches\transforms-1\files-1.1\firebase-analytics-impl-11.4.2.aar\266afe38e9d564b66b359ca5823523b4\jars\classes.ja
The error also occures when I add only one of the two packages.
Update build.gradle to com.android.tools.build:gradle:3.6.0 and do flutter run -v in your build in editor terminal. Because maybe you have to update your gradle-wrapper.properties too in your android folder.

Android Studio Error:Execution failed for task ':app:zipalignDebug'.

I tried to run one of my old projects in android studio & I am getting the following error :
Error:Execution failed for task ':app:zipalignDebug'.
> A problem occurred starting process 'command '/home/newaj/Android/build-tools/25.0.0/zipalign''

bunch of errors using kotlin in android studio

I'm trying to run my android app using Android studio Emulator using Kotlin programming language. It stopped suddenly and gave me few error any help ?
this is what is give me now at Event log(last 6 line are in Red color)
11:18 AM Gradle sync started
11:21 AM Project setup started
11:21 AM Gradle sync finished in 2m 51s 524ms
11:21 AM Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]
11:22 AM Gradle build finished in 37s 164ms
11:22 AM Configure Kotlin C:/Users/ziadm/ziadsaadApp/build.gradle was modified C:/Users/ziadm/ziadsaadApp/app/build.gradle was modified
11:22 AM Gradle sync started
11:23 AM Project setup started
11:23 AM Gradle sync finished in 10s 332ms
11:23 AM Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]
11:23 AM Gradle build finished in 16s 593ms
11:24 AM Executing tasks: [:app:assembleDebug]
11:24 AM Emulator: init: Could not find wglGetExtensionsStringARB!
11:24 AM Emulator: getGLES2ExtensionString: Could not find GLES 2.x config!
11:24 AM Emulator: Failed to obtain GLES 2.x extensions string!
11:24 AM Emulator: emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.
11:24 AM Emulator: Process finished with exit code -1073741819 (0xC0000005)
11:25 AM Gradle build finished in 54s 739ms
The problem is with emulated Performance. Put as it is on image.

Execution failed for task ':app:mergeDebugResources' & Build errors

In every project I'm getting same following error
Information:Gradle tasks [clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources]
Error:Execution failed for task ':app:mergeDebugResources'.
Error: Some file crunching failed, see logs for details
Error:Some file crunching failed, see logs for details
Information:BUILD FAILED
Even if I'm creating new project, without adding anything I'm getting above error, also getting an
Cannot resolve symbol 'R'
in every project.
Please check any resource file is missing or not.
Otherwise go to Build in the top menu and click on Clean Project.
If this also not works then restart Android Studio.
Sometimes this error comes due to the path of the project file.
Try relocating your project with short path address and then try to build the project.

Categories

Resources