ionic-team / ionic-team/ionic-cli

Using cli 4.0 RC.0 we run into an error for android release build

Abierto
#3,025 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
2k
Forks
682
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**Description:**
We are testing your **4.0 RC** cli as requested in the readme file :smile:
We have an ionic 3.9.2 app, but doing a simple android release build does not work for us, this is what we have done:
```
sudo npm i -g ionic@rc
ionic cordova build android --release
```

**Steps to Reproduce:**
If we do a UNSIGNED release on a fresh IONIC3 app with your new CLI 4 RC.0 we do not get the error, not sure if the problem is the app, cordova or the SIGNING method. But for sure the problem is only on `--release` tag

But if we revert to @latest cli the build is working again.

**Output:**
This is our output what we get
```
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformDexWithDexForRelease'.
> 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/actions/ItemListIntents;

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

* Get more help at https://help.gradle.org

BUILD FAILED in 8s
36 actionable tasks: 3 executed, 33 up-to-date
(node:17264) UnhandledPromiseRejectionWarning: Error:
/home/michi/software/workspace/web-client-ionic/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformDexWithDexForRelease'.
> 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/actions/ItemListIntents;

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

* Get more help at https://help.gradle.org

BUILD FAILED in 8s
at ChildProcess.whenDone
(/home/michi/software/workspace/web-client-ionic/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:567:12)
(node:17264) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing
inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
(rejection id: 1)
(node:17264) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise
rejections that are not handled will terminate the Node.js process with a non-zero exit code.
```

**My `ionic info`:**
```
cli packages: (/usr/lib/node_modules)
@ionic/cli-utils : 2.0.0-rc.0
ionic (Ionic CLI) : 4.0.0-rc.0

global packages:
cordova (Cordova CLI) : 8.0.0

local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : android 6.4.0
Ionic Framework : ionic-angular 3.9.2

System:
Android SDK Tools : 26.1.1
NodeJS : v8.10.0
npm : 5.7.1
OS : Linux 4.13

Environment Variables:
ANDROID_HOME : /abc/android/sdk
```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.