IONIC 3 - error generating build - Ionic Cordova build android --Prod --release

Asked

Viewed 1,087 times

0

Talk garela, well I’m having a problem trying to build an IONIC 3 application, follow the data below the environment and the errors I’m having, if someone has already gone through it and got the solution and can help, already thank you!

Ionic info

cli Packages: (/home/Robinson/Documents/myProject/my-app/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global Packages:

cordova (Cordova CLI) : 7.1.0 

local Packages:

@ionic/app-scripts : 3.1.0
Cordova Platforms  : android 6.3.0
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node              : v7.7.3
npm               : 4.1.2 
OS                : Linux 4.4

Environment Variables:

ANDROID_HOME : /home/Android/Sdk

Misc:

backend : pro

Cordova Chirements

Requirements check Results for android:

Java JDK: installed 1.8.0

Android SDK: installed true

Android target: installed android-27,android-26

Gradle: installed /usr/lib/Gradle/4.3.1/bin/Gradle

Error generated after running: Ionic Cordova build android --Prod --release

:transformClassesWithDexForArmv7Release FAILED

FAILURE: Build failed with an Exception.

  • What Went Wrong: Execution failed for task ':transformClassesWithDexForArmv7Release'.

    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/auth/api/signin/internal/zzo;

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

FAILED BUILD

Total time: 42,291 secs Error: /home/Robinson/Documents/myProject/my-app/Platforms/android/gradlew: 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.

FAILURE: Build failed with an Exception.

  • What Went Wrong: Execution failed for task ':transformClassesWithDexForArmv7Release'.

    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/auth/api/signin/internal/zzo;

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

[ERROR] An error occurred while running Cordova build android --release (Exit code 1).

2 answers

0

Well, I left my environment with:

Cordova Platforms  : android 6.3.0 

and took the firebase plugin:

npm remove  @ionic-native/firebase

ionic cordova plugin remove cordova-plugin-firebase

subistitui by https://github.com/angular/angularfire2

in this way compiles, if I update to android 7.0 Buga, so I’m working that way for now!

Thank you!

-1

This is a very boring problem to analyze, possibly there is inconsistency of library versions specifying Play Services.

Try logging into your project.properties file and checking the library versions. One suggestion is to try to make the same ones, you can make these changes in the file itself

Browser other questions tagged

You are not signed in. Login or sign up in order to post.