Error ionic cordova build android cli 3 [SOLVED]

Hi, I do not know what happened but I was previously working with ionic 2, I got damaged the pc and I had to reinstall the So, when I reinstalled everything necessary to work my project I was updated the ionic version and since then I can not compile I have done everything possible to delete the resource delete and reinstall folder from the none_modules to the plugins folder, delete all my files from the resource folder and leave the default ones in ionic, create another project and pass all the code to That new project and still I’m still throwing the same error

  (truncated) ... Assets UP-TO-DATE
        :CordovaLib:mergeDebugProguardFiles UP-TO-DATE
        :CordovaLib:packageDebugRenderscript UP-TO-DATE
        :CordovaLib:compileDebugRenderscript UP-TO-DATE
        :CordovaLib:generateDebugResValues UP-TO-DATE
        :CordovaLib:generateDebugResources UP-TO-DATE
        :CordovaLib:packageDebugResources UP-TO-DATE
        :CordovaLib:processDebugManifest UP-TO-DATE
        :CordovaLib:generateDebugBuildConfig UP-TO-DATE
        :CordovaLib:processDebugResources UP-TO-DATE
        :CordovaLib:generateDebugSources UP-TO-DATE
        :CordovaLib:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
        :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
        :CordovaLib:processDebugJavaRes UP-TO-DATE
        :CordovaLib:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
        :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
        :CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
        :CordovaLib:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
        :CordovaLib:transformNative_libsWithSyncJniLibsForDebug UP-TO-DATE
        :CordovaLib:bundleDebug UP-TO-DATE
        :CordovaLib:preReleaseBuild UP-TO-DATE
        :CordovaLib:checkReleaseManifest
        :CordovaLib:prepareReleaseDependencies
        :CordovaLib:compileReleaseAidl UP-TO-DATE
        :CordovaLib:compileReleaseNdk UP-TO-DATE
        :CordovaLib:copyReleaseLint UP-TO-DATE
        :CordovaLib:mergeReleaseShaders UP-TO-DATE
        :CordovaLib:compileReleaseShaders UP-TO-DATE
        :CordovaLib:generateReleaseAssets UP-TO-DATE
        :CordovaLib:mergeReleaseAssets UP-TO-DATE
        :CordovaLib:mergeReleaseProguardFiles UP-TO-DATE
        :CordovaLib:packageReleaseRenderscript UP-TO-DATE
        :CordovaLib:compileReleaseRenderscript UP-TO-DATE
        :CordovaLib:generateReleaseResValues UP-TO-DATE
        :CordovaLib:generateReleaseResources UP-TO-DATE
        :CordovaLib:packageReleaseResources UP-TO-DATE
        :CordovaLib:processReleaseManifest UP-TO-DATE
        :CordovaLib:generateReleaseBuildConfig UP-TO-DATE
        :CordovaLib:processReleaseResources UP-TO-DATE
        :CordovaLib:generateReleaseSources UP-TO-DATE
        :CordovaLib:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
        :CordovaLib:compileReleaseJavaWithJavac UP-TO-DATE
        :CordovaLib:processReleaseJavaRes UP-TO-DATE
        :CordovaLib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
        :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
        :CordovaLib:mergeReleaseJniLibFolders UP-TO-DATE
        :CordovaLib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
        :CordovaLib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
        :CordovaLib:bundleRelease UP-TO-DATE
        :prepareComAndroidSupportAnimatedVectorDrawable2600Alpha1Library UP-TO-DATE
        :prepareComAndroidSupportAppcompatV72600Alpha1Library UP-TO-DATE
        :prepareComAndroidSupportCardviewV72531Library UP-TO-DATE
        :prepareComAndroidSupportCustomtabs2531Library UP-TO-DATE
        :prepareComAndroidSupportSupportCompat2600Alpha1Library UP-TO-DATE
        :prepareComAndroidSupportSupportCoreUi2600Alpha1Library UP-TO-DATE
        :prepareComAndroidSupportSupportCoreUtils2600Alpha1Library UP-TO-DATE
        :prepareComAndroidSupportSupportFragment2600Alpha1Library UP-TO-DATE
        :prepareComAndroidSupportSupportMediaCompat2600Alpha1Library UP-TO-DATE
        :prepareComAndroidSupportSupportV132340Library UP-TO-DATE
        :prepareComAndroidSupportSupportV42600Alpha1Library UP-TO-DATE
        :prepareComAndroidSupportSupportVectorDrawable2600Alpha1Library UP-TO-DATE
        :prepareComFacebookAndroidFacebookAndroidSdk4230Library UP-TO-DATE
        :prepareComGoogleAndroidGmsPlayServicesBase1026Library UP-TO-DATE
        :prepareComGoogleAndroidGmsPlayServicesBasement1026Library UP-TO-DATE
        :prepareComGoogleAndroidGmsPlayServicesGcm1026Library UP-TO-DATE
        :prepareComGoogleAndroidGmsPlayServicesIid1026Library UP-TO-DATE
        :prepareComGoogleAndroidGmsPlayServicesLocation1026Library UP-TO-DATE
        :prepareComGoogleAndroidGmsPlayServicesTasks1026Library UP-TO-DATE
        :prepareMeLeolinShortcutBadger1114Library UP-TO-DATE
        :prepareOrgApacheCordovaCordovaLib623DebugLibrary UP-TO-DATE
        :prepareDebugDependencies
        :compileDebugAidl UP-TO-DATE
        :compileDebugRenderscript UP-TO-DATE
        :generateDebugBuildConfig UP-TO-DATE
        :generateDebugResValues UP-TO-DATE
        :generateDebugResources UP-TO-DATE
        :mergeDebugResources
        Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
        :mergeDebugResources FAILED

        BUILD FAILED

        Total time: 11.617 secs

        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: 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.


ionic info

global packages:

    @ionic/cli-utils : 1.2.0
    Cordova CLI      : 7.0.1
    Ionic CLI        : 3.2.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.2.1
    @ionic/cli-plugin-ionic-angular : 1.2.0
    Cordova Platforms               : android 6.2.3
    Ionic Framework                 : ionic-angular 3.1.0

System:

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

package.json

{
    "name": "ionic-app-base",
    "version": "0.0.0",
    "author": "Ionic Framework",
    "homepage": "http://ionicframework.com/",
    "private": true,
    "scripts": {
        "clean": "ionic-app-scripts clean",
        "build": "ionic-app-scripts build",
        "lint": "ionic-app-scripts lint",
        "ionic:build": "ionic-app-scripts build",
        "ionic:serve": "ionic-app-scripts serve"
    },
    "dependencies": {
        "@angular/common": "4.0.2",
        "@angular/compiler": "4.0.2",
        "@angular/compiler-cli": "4.0.2",
        "@angular/core": "4.0.2",
        "@angular/forms": "4.0.2",
        "@angular/http": "4.0.2",
        "@angular/platform-browser": "4.0.2",
        "@angular/platform-browser-dynamic": "4.0.2",
        "@ionic-native/background-geolocation": "^3.6.1",
        "@ionic-native/camera": "^3.6.1",
        "@ionic-native/core": "^3.8.0",
        "@ionic-native/device": "^3.8.0",
        "@ionic-native/diagnostic": "^3.6.1",
        "@ionic-native/facebook": "^3.6.1",
        "@ionic-native/file": "^3.7.0",
        "@ionic-native/file-path": "^3.6.1",
        "@ionic-native/geolocation": "^3.6.1",
        "@ionic-native/push": "^3.10.3",
        "@ionic-native/splash-screen": "3.4.2",
        "@ionic-native/status-bar": "3.4.2",
        "@ionic-native/transfer": "^3.7.0",
        "@ionic/cloud-angular": "^0.12.0",
        "@ionic/storage": "2.0.1",
        "angular2-elastic": "^0.13.0",
        "cordova-android": "^6.2.3",
        "cordova-plugin-camera": "~2.4.1",
        "cordova-plugin-console": "^1.0.7",
        "cordova-plugin-device": "^1.1.6",
        "cordova-plugin-facebook4": "^1.9.0",
        "cordova-plugin-file": "~4.3.3",
        "cordova-plugin-file-transfer": "~1.6.3",
        "cordova-plugin-filepath": "~1.0.2",
        "cordova-plugin-geolocation": "~2.4.2",
        "cordova-plugin-inappbrowser": "~1.7.0",
        "cordova-plugin-nativestorage": "~2.2.2",
        "cordova-plugin-splashscreen": "^4.0.3",
        "cordova-plugin-statusbar": "^2.2.3",
        "cordova-plugin-whitelist": "^1.3.2",
        "cordova.plugins.diagnostic": "^3.6.2",
        "ionic-angular": "3.1.0",
        "ionic-plugin-keyboard": "~2.2.1",
        "ng2-translate": "^5.0.0",
        "phonegap-plugin-push": "^1.10.4",
        "rxjs": "5.1.1",
        "sw-toolbox": "3.4.0",
        "zone.js": "^0.8.5"
    },
    "devDependencies": {
        "@ionic/app-scripts": "^1.3.7",
        "@ionic/cli-plugin-cordova": "1.2.1",
        "@ionic/cli-plugin-ionic-angular": "^1.2.0",
        "typescript": "~2.2.1"
    },
    "cordovaPlugins": [
        "cordova-plugin-whitelist",
        "cordova-plugin-statusbar",
        "cordova-plugin-device",
        "cordova-plugin-console",
        "cordova-plugin-splashscreen",
        "ionic-plugin-keyboard"
    ],
    "cordovaPlatforms": [],
    "description": "Yourbiglove: An Ionic project",
    "cordova": {
        "plugins": {
            "cordova-plugin-camera": {},
            "cordova-plugin-file": {},
            "cordova-plugin-file-transfer": {},
            "cordova-plugin-filepath": {},
            "cordova-plugin-geolocation": {},
            "cordova-plugin-inappbrowser": {},
            "cordova-plugin-nativestorage": {},
            "ionic-plugin-keyboard": {},
            "cordova-plugin-facebook4": {
                "APP_ID": "480819305447275",
                "APP_NAME": "Yourbiglove"
            },
            "cordova-plugin-console": {},
            "cordova-plugin-device": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-statusbar": {},
            "cordova-plugin-whitelist": {},
            "cordova.plugins.diagnostic": {},
            "phonegap-plugin-push": {
                "SENDER_ID": "962627065310"
            }
        },
        "platforms": [
            "android"
        ]
    }
}

gradle -v

------------------------------------------------------------
Gradle 3.5
------------------------------------------------------------

Build time:   2017-04-10 13:37:25 UTC
Revision:     b762622a185d59ce0cfc9cbc6ab5dd22469e18a6

Groovy:       2.4.10
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_131 (Oracle Corporation 25.131-b11)
OS:           Windows 10 10.0 amd64

Commented that it is only when compiling in android the project works normally with ionic serve

What command exactly are you executing?
Try again with --verbose added at the end.
Also try without ionic in front, directly with cordova ...

Hi Thanks for reply

ionic cordova build android --verbose

[DEBUG] Load global plugin @ionic/cli-plugin-proxy
[DEBUG] Throwing PLUGIN_NOT_INSTALLED for global @ionic/cli-plugin-proxy
[DEBUG] Load local plugin @ionic/cli-plugin-cordova
[DEBUG] Load local plugin @ionic/cli-plugin-ionic-angular
[DEBUG] Getting plugin info for ionic
[DEBUG] Getting plugin info for @ionic/cli-plugin-cordova
[DEBUG] Getting plugin info for @ionic/cli-plugin-ionic-angular
[DEBUG] Checking for latest plugin version of ionic@latest.
[DEBUG] Checking for latest plugin version of @ionic/cli-plugin-cordova@latest.
[DEBUG] Checking for latest plugin version of @ionic/cli-plugin-ionic-angular@latest.
[DEBUG] Latest version of ionic@latest is 3.2.0.
[DEBUG] Latest version of @ionic/cli-plugin-cordova@latest is 1.2.1.
[DEBUG] Latest version of @ionic/cli-plugin-ionic-angular@latest is 1.2.0.
Running app-scripts build: --iscordovaserve --external-ip-required --nobrowser

[03:52:55]  build dev started ...
[03:52:55]  clean started ...
[03:52:55]  clean finished in 25 ms
[03:52:55]  copy started ...
[03:52:55]  transpile started ...
[03:53:02]  transpile finished in 7.47 s
[03:53:02]  preprocess started ...
[03:53:02]  deeplinks started ...
[03:53:03]  deeplinks finished in 229 ms
[03:53:03]  preprocess finished in 236 ms
[03:53:03]  webpack started ...
[03:53:03]  copy finished in 8.04 s
[03:53:22]  webpack finished in 19.08 s
[03:53:22]  sass started ...
[03:53:23]  sass finished in 1.67 s
[03:53:23]  postprocess started ...
[03:53:23]  postprocess finished in 11 ms
[03:53:23]  lint started ...
[03:53:23]  build dev finished in 28.58 s
> cordova build android
/ Running command [03:53:32]  lint finished in 8.39 s
✖ Running command - failed!

[ERROR] Cordova encountered an error.
        You may get more insight by running the Cordova command above directly.

[DEBUG] !!! ERROR ENCOUNTERED !!!
[ERROR] An error occurred while running cordova build android (exit code 1):

        (truncated) ... generateDebugAssets UP-TO-DATE
        :CordovaLib:mergeDebugAssets UP-TO-DATE
        :CordovaLib:mergeDebugProguardFiles UP-TO-DATE
        :CordovaLib:packageDebugRenderscript UP-TO-DATE
        :CordovaLib:compileDebugRenderscript UP-TO-DATE
        :CordovaLib:generateDebugResValues UP-TO-DATE
        :CordovaLib:generateDebugResources UP-TO-DATE
        :CordovaLib:packageDebugResources UP-TO-DATE
        :CordovaLib:processDebugManifest UP-TO-DATE
        :CordovaLib:generateDebugBuildConfig UP-TO-DATE
        :CordovaLib:processDebugResources UP-TO-DATE
        :CordovaLib:generateDebugSources UP-TO-DATE
        :CordovaLib:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
        :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
        :CordovaLib:processDebugJavaRes UP-TO-DATE
        :CordovaLib:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
        :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
        :CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
        :CordovaLib:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
        :CordovaLib:transformNative_libsWithSyncJniLibsForDebug UP-TO-DATE
        :CordovaLib:bundleDebug UP-TO-DATE
        :CordovaLib:preReleaseBuild UP-TO-DATE
        :CordovaLib:checkReleaseManifest
        :CordovaLib:prepareReleaseDependencies
        :CordovaLib:compileReleaseAidl UP-TO-DATE
        :CordovaLib:compileReleaseNdk UP-TO-DATE
        :CordovaLib:copyReleaseLint UP-TO-DATE
        :CordovaLib:mergeReleaseShaders UP-TO-DATE
        :CordovaLib:compileReleaseShaders UP-TO-DATE
        :CordovaLib:generateReleaseAssets UP-TO-DATE
        :CordovaLib:mergeReleaseAssets UP-TO-DATE
        :CordovaLib:mergeReleaseProguardFiles UP-TO-DATE
        :CordovaLib:packageReleaseRenderscript UP-TO-DATE
        :CordovaLib:compileReleaseRenderscript UP-TO-DATE
        :CordovaLib:generateReleaseResValues UP-TO-DATE
        :CordovaLib:generateReleaseResources UP-TO-DATE
        :CordovaLib:packageReleaseResources UP-TO-DATE
        :CordovaLib:processReleaseManifest UP-TO-DATE
        :CordovaLib:generateReleaseBuildConfig UP-TO-DATE
        :CordovaLib:processReleaseResources UP-TO-DATE
        :CordovaLib:generateReleaseSources UP-TO-DATE
        :CordovaLib:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
        :CordovaLib:compileReleaseJavaWithJavac UP-TO-DATE
        :CordovaLib:processReleaseJavaRes UP-TO-DATE
        :CordovaLib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
        :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
        :CordovaLib:mergeReleaseJniLibFolders UP-TO-DATE
        :CordovaLib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
        :CordovaLib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
        :CordovaLib:bundleRelease UP-TO-DATE
        :prepareComAndroidSupportAnimatedVectorDrawable2531Library UP-TO-DATE
        :prepareComAndroidSupportAppcompatV72531Library UP-TO-DATE
        :prepareComAndroidSupportCardviewV72531Library UP-TO-DATE
        :prepareComAndroidSupportCustomtabs2531Library UP-TO-DATE
        :prepareComAndroidSupportSupportCompat2531Library UP-TO-DATE
        :prepareComAndroidSupportSupportCoreUi2531Library UP-TO-DATE
        :prepareComAndroidSupportSupportCoreUtils2531Library UP-TO-DATE
        :prepareComAndroidSupportSupportFragment2531Library UP-TO-DATE
        :prepareComAndroidSupportSupportMediaCompat2531Library UP-TO-DATE
        :prepareComAndroidSupportSupportV132531Library UP-TO-DATE
        :prepareComAndroidSupportSupportV42531Library UP-TO-DATE
        :prepareComAndroidSupportSupportVectorDrawable2531Library UP-TO-DATE
        :prepareComFacebookAndroidFacebookAndroidSdk4230Library UP-TO-DATE
        :prepareComGoogleAndroidGmsPlayServicesBase1026Library UP-TO-DATE
        :prepareComGoogleAndroidGmsPlayServicesBasement1026Library UP-TO-DATE
        :prepareComGoogleAndroidGmsPlayServicesGcm1026Library UP-TO-DATE
        :prepareComGoogleAndroidGmsPlayServicesIid1026Library UP-TO-DATE
        :prepareComGoogleAndroidGmsPlayServicesLocation1026Library UP-TO-DATE
        :prepareComGoogleAndroidGmsPlayServicesTasks1026Library UP-TO-DATE
        :prepareMeLeolinShortcutBadger1114Library UP-TO-DATE
        :prepareOrgApacheCordovaCordovaLib623DebugLibrary UP-TO-DATE
        :prepareDebugDependencies
        :compileDebugAidl UP-TO-DATE
        :compileDebugRenderscript UP-TO-DATE
        :generateDebugBuildConfig UP-TO-DATE
        :generateDebugResValues UP-TO-DATE
        :generateDebugResources UP-TO-DATE
        :mergeDebugResources
        Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
        :mergeDebugResources FAILED

        BUILD FAILED

        Total time: 17.202 secs

        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: 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.



Also try to compile in phonegap build and me the same error but with another detail

:mergeDebugResources
:processDebugManifest/project/AndroidManifest.xml:27:9-38 Error:
	Attribute meta-data#android.support.VERSION@value value=(26.0.0-alpha1) from [com.android.support:support-v4:26.0.0-alpha1] AndroidManifest.xml:27:9-38
	is also present at [com.android.support:cardview-v7:25.3.1] AndroidManifest.xml:24:9-31 value=(25.3.1).
	Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:25:5-27:41 to override.

Try deleting the cordova-plugin-facebook4 and I compile but I need the plugin, will it be a problem with the versions?

Solved. :slight_smile:

First I removed the plugin:

ionic cordova plugin rm cordova-plugin-facebook4
then I added the version number to the cmd line, like

ionic cordova plugin add cordova-plugin-facebook4@1.7.4 --save --variable APP_ID="<myid>" --variable APP_NAME="<myname>"

The new version of the plugin has problems

Reference:

This does not work for me. But the link below yes.

I hope to save someone’s life as he saved mine. 0.0