ionic-team / ionic-cli

The Ionic command-line interface
MIT License
2k stars 654 forks source link

Build Fail after update to Ionic CLI v3 #2321

Closed brandyscarney closed 7 years ago

brandyscarney commented 7 years ago

From @naveedahmed1 on May 19, 2017 22:14

Ionic version: (check one with "x") [ ] 1.x [ ] 2.x [x ] 3.x

I'm submitting a ... (check one with "x") [x ] bug report [ ] feature request [ ] support request

Current behavior:

With Ionic 3 and Ionic CLI v3, run and build command fails with below error

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

Steps to Reproduce Error

Create a new project

ionic start MyPrtoject blank --id com.myproject

Add platform android

ionic cordova platform add android@6.2.3

Run Project

ionic cordova run android

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

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

Some posts on forum suggest removing platform and ./resources/android and adding platform again and generating resources again. But it doesn't work.

Copied from original issue: driftyco/ionic#11732

janpio commented 7 years ago

@naveedahmed1, please run the same command with --verbose added at the end. Also run the same command without the ionic in front, like suggested in the error message. Also run cordova requirements please.

naveedahmed1 commented 7 years ago

Thank you @piotrowski for your reply. Below is the output of cordova requirements

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-25
Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-3.2\bin\gradle

Below is the output of cordova run android --verbose

E:\MyPrtoject>cordova run android --verbose
No scripts found for hook "before_run".
No scripts found for hook "before_prepare".
Checking config.xml and package.json for saved platforms that haven't been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
PlatformApi successfully found for platform android
Checking config.xml for saved plugins that haven't been added to the project
Checking for any plugins added to the project that have not been installed in android platform
No differences found between plugins added to project and installed in android platform. Continuing...
Generating platform-specific config.xml from defaults for android at E:\MyPrtoject\platforms\android\res\xml\config.xml
Merging project's config.xml into platform-specific android config.xml
Merging and updating files from [www, platforms\android\platform_www] to platforms\android\assets\www
Wrote out android application name "MyApp" to E:\MyPrtoject\platforms\android\res\values\strings.xml
android-versionCode not found in config.xml. Generating a code based on version in config.xml (0.0.1): 1
Wrote out Android package name "io.ionic.starter" to E:\MyPrtoject\platforms\android\src\io\ionic\starter\MainActivity.java
Updating icons at platforms\android\res
Updating splash screens at platforms\android\res
This app does not have additional resource files defined
Prepared android project successfully
No scripts found for hook "after_prepare".
ANDROID_HOME=C:\Android\sdk1
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_131
Subproject Path: CordovaLib
Running command: cmd "/s /c "E:\MyPrtoject\platforms\android\gradlew.bat cdvBuildDebug -b E:\MyPrtoject\platforms\android\build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pandroid.useDeprecatedNdk=true""
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_19ejzxm573k5iwib8z7n9lktx.run(E:\MyPrtoject\platforms\android\build.gradle:137)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint UP-TO-DATE
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugShaders UP-TO-DATE
:CordovaLib:compileDebugShaders UP-TO-DATE
:CordovaLib: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
: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

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:
:mergeDebugResources FAILED
> Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:

* Try:

BUILD FAILED

Total time: 1.65 secs
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Command finished with error code 1: cmd /s /c "E:\MyPrtoject\platforms\android\gradlew.bat cdvBuildDebug -b E:\MyPrtoject\platforms\android\build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pandroid.useDeprecatedNdk=true"
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.
janpio commented 7 years ago

Remove the generated resources (not in /platform but in /resources), remove the android platform, add the platform again, generate the resources again. Maybe your icon and splash template is also broken, so try removing them and replace them with the ones you get from a new project. Then see if this fixes it.

naveedahmed1 commented 7 years ago

Already tried it, tried it again. removed folders /resources/android and /resources/ios then run the command ionic cordova resources removed the platform then added it again using command ionic cordova platform add android@latest. Even after this its throwing the same error.

I haven't added any custom code, its the default project generated through command ionic start MyProject blank --id com.myproject.

I just added the platform android and tried to run and it fails. Even tried creating a new project still same error.

janpio commented 7 years ago

Hm, I don't see anything obvious from the information you posted.

Maybe try ionic start MyProject blank without the param?

naveedahmed1 commented 7 years ago

Still same error. Can you please try it on your machine with latest versions or Ionicand Cordova?

Juanperezc commented 7 years ago

I have the same Error.

log `(truncated) ... rateDebugAssets :CordovaLib:mergeDebugAssets :CordovaLib:mergeDebugProguardFiles :CordovaLib:packageDebugRenderscript UP-TO-DATE :CordovaLib:compileDebugRenderscript :CordovaLib:generateDebugResValues :CordovaLib:generateDebugResources :CordovaLib:packageDebugResources :CordovaLib:processDebugManifest :CordovaLib:generateDebugBuildConfig :CordovaLib:processDebugResources :CordovaLib:generateDebugSources :CordovaLib:incrementalDebugJavaCompilationSafeguard :CordovaLib:compileDebugJavaWithJavac :CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. :CordovaLib:processDebugJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForDebug :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug :CordovaLib:mergeDebugJniLibFolders :CordovaLib:transformNative_libsWithMergeJniLibsForDebug :CordovaLib:transformNative_libsWithSyncJniLibsForDebug :CordovaLib:bundleDebug :CordovaLib:preReleaseBuild UP-TO-DATE :CordovaLib:checkReleaseManifest :CordovaLib:prepareReleaseDependencies :CordovaLib:compileReleaseAidl :CordovaLib:compileReleaseNdk UP-TO-DATE :CordovaLib:copyReleaseLint UP-TO-DATE :CordovaLib:mergeReleaseShaders :CordovaLib:compileReleaseShaders :CordovaLib:generateReleaseAssets :CordovaLib:mergeReleaseAssets :CordovaLib:mergeReleaseProguardFiles :CordovaLib:packageReleaseRenderscript UP-TO-DATE :CordovaLib:compileReleaseRenderscript :CordovaLib:generateReleaseResValues :CordovaLib:generateReleaseResources :CordovaLib:packageReleaseResources :CordovaLib:processReleaseManifest :CordovaLib:generateReleaseBuildConfig :CordovaLib:processReleaseResources :CordovaLib:generateReleaseSources :CordovaLib:incrementalReleaseJavaCompilationSafeguard :CordovaLib:compileReleaseJavaWithJavac :CordovaLib:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. :CordovaLib:processReleaseJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForRelease :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease :CordovaLib:mergeReleaseJniLibFolders :CordovaLib:transformNative_libsWithMergeJniLibsForRelease :CordovaLib:transformNative_libsWithSyncJniLibsForRelease :CordovaLib:bundleRelease :prepareComAndroidSupportAnimatedVectorDrawable2600Alpha1Library :prepareComAndroidSupportAppcompatV72600Alpha1Library :prepareComAndroidSupportCardviewV72531Library :prepareComAndroidSupportCustomtabs2531Library :prepareComAndroidSupportSupportCompat2600Alpha1Library :prepareComAndroidSupportSupportCoreUi2600Alpha1Library :prepareComAndroidSupportSupportCoreUtils2600Alpha1Library :prepareComAndroidSupportSupportFragment2600Alpha1Library :prepareComAndroidSupportSupportMediaCompat2600Alpha1Library :prepareComAndroidSupportSupportV132340Library :prepareComAndroidSupportSupportV42600Alpha1Library :prepareComAndroidSupportSupportVectorDrawable2600Alpha1Library :prepareComFacebookAndroidFacebookAndroidSdk4230Library :prepareComGoogleAndroidGmsPlayServicesBase1026Library :prepareComGoogleAndroidGmsPlayServicesBasement1026Library :prepareComGoogleAndroidGmsPlayServicesGcm1026Library :prepareComGoogleAndroidGmsPlayServicesIid1026Library :prepareComGoogleAndroidGmsPlayServicesLocation1026Library :prepareComGoogleAndroidGmsPlayServicesTasks1026Library :prepareMeLeolinShortcutBadger1114Library :prepareOrgApacheCordovaCordovaLib623DebugLibrary :prepareDebugDependencies :compileDebugAidl :compileDebugRenderscript :generateDebugBuildConfig :generateDebugResValues :generateDebugResources :mergeDebugResources Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: :mergeDebugResources FAILED

    BUILD FAILED

    Total time: 28.18 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:
    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.`

Java JDK: installed 1.8.0 Android SDK: installed true Android target: installed Google Inc.:Google APIs:22,android-25,android-22,android-8 Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-2.10\bin\gradle

Ionif 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`
gianpaj commented 7 years ago

I'm not able to do a build either. I tried removing cordova-android by running: cordova platform remove android and then adding it again cordova platform add android

But I'm getting this error:

$ cordova build android 

* What went wrong:
Execution failed for task ':transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/iid/zzc;

* Try:
Run with --stacktrace o
$ cordova info
Collecting Data...

Node version: v6.10.2

Cordova version: 7.0.1

Config.xml file:

<?xml version='1.0' encoding='utf-8'?>
<widget android-packageName="xyz.givebox.app" android-versionCode="11200" ios-CFBundleIdentifier="xyz.givebox" ios-CFBundleVersion="11200" version="1.1.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Givebox</name>
    <description>App for giving things away locally</description>
    <author email="hello@givebox.xyz" href="https://givebox.xyz/">Givebox Team</author>
    <content src="index.html" />
    <access origin="*" />
    <allow-navigation href="http://ionic.local/*" />
    <allow-navigation href="tel:*" />
    <allow-navigation href="mailto:*" />
    <allow-navigation href="http://192.168.1.110:8100" />
    <allow-navigation href="http://192.168.1.110:8110" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <icon src="resources/android/icon/drawable-xhdpi-icon.png" />
    <platform name="android">
        <hook src="hooks/androidBeforeBuild.js" type="before_build" />
        <hook src="hooks/androidAfterBuild.js" type="after_build" />
        <allow-intent href="market:*" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
...
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon height="40" src="resources/ios/icon/iphone20@2x.png" width="40" />
....
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
    </platform>
    <preference name="target-device" value="handset" />
    <preference name="webviewbounce" value="false" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="android-minSdkVersion" value="16" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="300" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="ShowSplashScreenSpinner" value="false" />
    <preference name="AutoHideSplashScreen" value="false" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="3000" />
    <engine name="android" spec="^6.2.3" />
    <engine name="ios" spec="^4.4.0" />
    <plugin name="cordova-plugin-camera" spec="^2.4.1">
        <variable name="CAMERA_USAGE_DESCRIPTION" value="..." />
        <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="..." />
    </plugin>
    <plugin name="cordova-plugin-console" spec="1.0.5" />
    <plugin name="cordova-plugin-crop" spec="^0.4.0" />
    <plugin name="cordova-plugin-device" spec="^1.1.6" />
    <plugin name="cordova-plugin-facebook4" spec="^1.7.4">
        <variable name="APP_ID" value="..." />
        <variable name="APP_NAME" value="..." />
    </plugin>
    <plugin name="cordova-plugin-file" spec="~4.3.2" />
    <plugin name="cordova-plugin-geolocation" spec="~2.4.2" />
    <plugin name="cordova-plugin-globalization" spec="~1.0.6" />
    <plugin name="cordova-plugin-googleplus" spec="^5.1.1">
        <variable name="REVERSED_CLIENT_ID" value="com.googleusercontent.apps.743421796244-...." />
    </plugin>
    <plugin name="cordova-plugin-inappbrowser" spec="^1.7.1" />
    <plugin name="cordova-plugin-splashscreen" spec="~4.0.2" />
    <plugin name="cordova-plugin-statusbar" spec="2.2.2" />
    <plugin name="cordova-plugin-whitelist" spec="1.3.1" />
    <plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
    <plugin name="phonegap-plugin-push" spec="^1.10.3">
        <variable name="SENDER_ID" value="..." />
    </plugin>
</widget>

Plugins:

cordova-plugin-camera,cordova-plugin-compat,cordova-plugin-console,cordova-plugin-crop,cordova-plugin-device,cordova-plugin-facebook4,cordova-plugin-file,cordova-plugin-geolocation,cordova-plugin-globalization,cordova-plugin-googleplus,cordova-plugin-inappbrowser,cordova-plugin-splashscreen,cordova-plugin-statusbar,cordova-plugin-whitelist,ionic-plugin-keyboard,phonegap-plugin-push

Android platform:

*************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
*************************************************************************
Running /Users/<user>/Library/Android/sdk/tools/bin/avdmanager list target

Available Android targets:
----------
id: 1 or "Google Inc.:Google APIs (x86 System Image):19"
     Name: Google APIs (x86 System Image)
     Type: Add-On
     Vendor: Google Inc.
     Revision: 18
     Description: Google APIs (x86 System Image)
     Based on Android 4.4 (API level 19)
     Libraries:
      * com.android.future.usb.accessory (usb.jar)
          API for USB Accessories
      * com.google.android.media.effects (effects.jar)
          Collection of video effects
      * com.google.android.maps (maps.jar)
          API for Google Maps
----------
id: 2 or "android-19"
     Name: Android API 19
     Type: Platform
     API level: 19
     Revision: 4
----------
id: 3 or "Google Inc.:Google APIs:21"
     Name: Google APIs
     Type: Add-On
     Vendor: Google Inc.
     Revision: 1
     Description: Google APIs, Android 21
     Based on Android 5.0 (API level 21)
     Libraries:
      * com.google.android.media.effects (effects.jar)
          Collection of video effects
      * com.android.future.usb.accessory (usb.jar)
          API for USB Accessories
      * com.google.android.maps (maps.jar)
          API for Google Maps
----------
id: 4 or "android-21"
     Name: Android API 21
     Type: Platform
     API level: 21
     Revision: 2
----------
id: 5 or "Google Inc.:Google APIs:22"
     Name: Google APIs
     Type: Add-On
     Vendor: Google Inc.
     Revision: 1
     Description: Google APIs, Android 22
     Based on Android 5.1 (API level 22)
     Libraries:
      * com.google.android.media.effects (effects.jar)
          Collection of video effects
      * com.android.future.usb.accessory (usb.jar)
          API for USB Accessories
      * com.google.android.maps (maps.jar)
          API for Google Maps
----------
id: 6 or "android-22"
     Name: Android API 22
     Type: Platform
     API level: 22
     Revision: 2
----------
id: 7 or "Google Inc.:Google APIs:23"
     Name: Google APIs
     Type: Add-On
     Vendor: Google Inc.
     Revision: 1
     Description: Google APIs, Android 23
     Based on Android 6.0 (API level 23)
     Libraries:
      * com.google.android.media.effects (effects.jar)
          Collection of video effects
      * com.android.future.usb.accessory (usb.jar)
          API for USB Accessories
      * com.google.android.maps (maps.jar)
          API for Google Maps
----------
id: 8 or "android-23"
     Name: Android API 23
     Type: Platform
     API level: 23
     Revision: 3
----------
id: 9 or "android-24"
     Name: Android API 24
     Type: Platform
     API level: 24
     Revision: 2
----------
id: 10 or "android-25"
     Name: Android API 25
     Type: Platform
     API level: 25
     Revision: 3

iOS platform:

Xcode 8.3.3
Build version 8E3004b

BTW the ios version builds successfully.

naveedahmed1 commented 7 years ago

There certainly is something wrong with cli, last time I had to reinstall windows. And now after the new update I am getting the same error again.

janpio commented 7 years ago

If it happens on commands without ionic in them it is impossible to be caused by Ionic CLI.

naveedahmed1 commented 7 years ago

It happens without ionic as well, but its happening after ionic version which introduced ionic cordova. The cordova and android version didnt change during this period.

janpio commented 7 years ago

That is technically impossible. The ionic command and CLI can not influence the execution of cordova alone.

gianpaj commented 7 years ago

It's probably not an issue of ionic-cli. Most likely when I upgraded the Android SDK the cordova plugins started borking.

I upgraded these plugins and one or more of these were the cause:

esmiralha commented 7 years ago

There is a related issue at StackOverflow: https://stackoverflow.com/questions/44550703/cordova-multiple-dex-files-define-lcom-google-android-gms-iid-zzc

AnkitMaheshwariIn commented 7 years ago

I too had same issue! Is there any solution, anyone found ?? This happens when I installed plugin "ionic cordova plugin add https://github.com/apptum/cordova-plugin-firebase.git " This plugin is required!

Please let me know if any solution found..

screen shot 2017-06-23 at 6 09 37 pm

Problem remains: any solution anyone found ??

massivebrains commented 7 years ago

Same issue here!

imhoffd commented 7 years ago

Hey all, as people have mentioned, this isn't an issue with the Ionic CLI. This is a compilation issue with Cordova Android. Try what @gianpaj said here: https://github.com/ionic-team/ionic-cli/issues/2321#issuecomment-309574387

Use Stack Overflow and the forum if you're still encountering issues. This repo is for Ionic CLI issues.

aurelianzaha commented 6 years ago

Hi,

I had the same problem and I was able to solve it. Please check below my asnwer: https://stackoverflow.com/questions/46865108/unable-to-build-v1-after-updating-to-cli-3-for-ionic/47485515#47485515

renjithspace commented 6 years ago

SOLVED

  1. Remove platforms $ sudo rm -rf platforms

  2. Add and re-build platform

    $ ionic cordova platform add ios
    $ ionic cordova build ios
  3. Run $ ionic cordova run ios --target='iPhone-X'

It will fix the error