[SOLVED] Execution failed for task ‘:mergeDebugResources’


#1

Hi guys,

I am running the ionic cordova build android and getting this error:

:mergeDebugResources
Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:

* 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: 49.569 secs
Error: cmd: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Could you please help me with this?
Thanks in advance.


ionic info

global packages:

@ionic/cli-utils : 1.1.2
Cordova CLI      : 7.0.1
Ionic CLI        : 3.1.2

local packages:

@ionic/app-scripts              : 1.3.7
@ionic/cli-plugin-cordova       : 1.1.2
@ionic/cli-plugin-ionic-angular : 1.1.2
Ionic Framework                 : ionic-angular 3.2.1

System:

Node       : v6.9.4
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed

Android project created with cordova-android@6.2.3


Error while generating apk for android platform
#2

check out this discussion


#3

Hi, @vnyksj .

It works. What I do is remove all the icon and splash image inside the ./resources/android (broken image maybe).
Then generate again by running ionic cordova resources and build it again.

Thanks a lot.


Build APK Problem
#4

This solution isnt working for me.

I removed both ios and android folders in resources and then used the command ionic cordova resources to generate resources again.

Then I tried ionic cordova run android but it generates below errors:

I am trying it with very basic project generated using command ionic start MyProject blank, no additional plugin installed no custom code added just default project.


:mergeDebugResources

Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
:mergeDebugResources FAILED

BUILD FAILED

Total time: 1.625 secs
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:

* 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).

ionic info


global packages:

    @ionic/cli-utils : 1.1.2
    Cordova CLI      : 7.0.1
    Ionic CLI        : 3.1.2

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.1.2
    @ionic/cli-plugin-ionic-angular : 1.1.2
    Ionic Framework                 : ionic-angular 3.2.1

System:

    Node       : v7.9.0
    OS         : Windows 10
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed

Any help would be really appreciated.


#5

I have the same problem


#6

Even i had it but did followings to fix it
Delete the icon files under android resources folder then run the command
ionic cordova resources --icon
then ran fine :slight_smile:


#7

Wow my God! This is true. OK for me!


#8

Yes problem occurs with the images in both icon and splash folders. What i did was copy from another working icon and splash folder and it works. Thanks fikrie_uno.


#9

thanks, it works for me


#10

Man you save my life, help a lots kkkk Thank really Thank


#11

it works for me too.
First you should input ionic cordova resorces and then
ionic cordova build android, that will create the apk for install in your phone


#12

Hello guys,
I had this same project when developing an application.
I tried everything I saw on the web and nothing fixed the problem.
So I had the idea to stop the protection of my antivirus, and only then I was able to build it successfully.
Try this, pause the antivirus and again run the command: ionic cordova run android.
Thanks a lot.


#13

Don’t know why but deleting all resources and regenerating with ionic cordova resources solved it. Thanks guys!


Error while generating APK application
#14

Yes, the real culprit in my case.
I wasted my whole day on this.

  • Uninstalled native plugins
  • Deleted my build-tool 27.0.3 (since aapt.exe file was deleted by my m*** f** antivirus)
  • Reinstalled build-tools
  • Removed my resources
    so on…

I owe you a handshake @rafaelfilholm :slight_smile:


#15

Removed the android folder - just deleted it
then run android again…
Happened twice today.
Any way to stop it?


#16

hiiiiii fnds
project name is small not big word mostly problem solve…