ionicthemes / ion2fullapp

This is our public repository for customers to report bugs about Ion2FullApp - Ionic Template

Home Page:https://ionicthemes.com/product/ion2fullapp-full-ionic2-app-template-elite-version

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Execution failed for task ':transformClassesWithMultidexlistForDebug'

sandrhymend opened this issue · comments

I am getting this error :
$ cordova run android --target=Galaxy_Nexus_API_22
Discovered plugin "mx.ferreyra.callnumber" in config.xml. Adding it to the project
Plugin "call-number" already installed on android.
Plugin "call-number" already installed on ios.
ANDROID_HOME=/Users/sandramendoza/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home
Subproject Path: CordovaLib

Configure project :
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

Configure project :CordovaLib
publishNonDefault is deprecated and has no effect anymore. All variants are now published.

Task :checkDebugClasspath UP-TO-DATE
Task :preBuild UP-TO-DATE
Task :CordovaLib:preBuild UP-TO-DATE
Task :CordovaLib:preDebugBuild UP-TO-DATE
Task :CordovaLib:checkDebugManifest UP-TO-DATE
Task :CordovaLib:processDebugManifest UP-TO-DATE
Task :preDebugBuild UP-TO-DATE
Task :CordovaLib:compileDebugAidl NO-SOURCE
Task :compileDebugAidl NO-SOURCE
Task :CordovaLib:packageDebugRenderscript NO-SOURCE
Task :compileDebugRenderscript UP-TO-DATE
Task :checkDebugManifest UP-TO-DATE
Task :generateDebugBuildConfig UP-TO-DATE
Task :prepareLintJar UP-TO-DATE
Task :mainApkListPersistenceDebug UP-TO-DATE
Task :generateDebugResValues UP-TO-DATE
Task :generateDebugResources UP-TO-DATE
Task :CordovaLib:compileDebugRenderscript UP-TO-DATE
Task :CordovaLib:generateDebugResValues UP-TO-DATE
Task :CordovaLib:generateDebugResources UP-TO-DATE
Task :CordovaLib:packageDebugResources UP-TO-DATE
Task :mergeDebugResources UP-TO-DATE
Task :createDebugCompatibleScreenManifests UP-TO-DATE
Task :processDebugManifest UP-TO-DATE
Task :splitsDiscoveryTaskDebug UP-TO-DATE
Task :CordovaLib:generateDebugRFile UP-TO-DATE
Task :processDebugResources UP-TO-DATE
Task :generateDebugSources UP-TO-DATE
Task :CordovaLib:generateDebugBuildConfig UP-TO-DATE
Task :CordovaLib:prepareLintJar UP-TO-DATE
Task :CordovaLib:generateDebugSources UP-TO-DATE
Task :CordovaLib:javaPreCompileDebug UP-TO-DATE
Task :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
Task :CordovaLib:processDebugJavaRes NO-SOURCE
Task :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
Task :javaPreCompileDebug UP-TO-DATE
Task :compileDebugJavaWithJavac UP-TO-DATE
Task :compileDebugNdk NO-SOURCE
Task :compileDebugSources UP-TO-DATE
Task :mergeDebugShaders UP-TO-DATE
Task :compileDebugShaders UP-TO-DATE
Task :generateDebugAssets UP-TO-DATE
Task :CordovaLib:mergeDebugShaders UP-TO-DATE
Task :CordovaLib:compileDebugShaders UP-TO-DATE
Task :CordovaLib:generateDebugAssets UP-TO-DATE
Task :CordovaLib:packageDebugAssets UP-TO-DATE
Task :mergeDebugAssets UP-TO-DATE
Task :transformClassesWithDexBuilderForDebug UP-TO-DATE
Task :transformClassesWithMultidexlistForDebug FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':transformClassesWithMultidexlistForDebug'.

com.android.build.api.transform.TransformException: Error while generating the main dex list.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.

/Users/sandramendoza/Documents/Ionic-Projects/ion2fullapp-elite/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':transformClassesWithMultidexlistForDebug'.

com.android.build.api.transform.TransformException: Error while generating the main dex list.

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

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

BUILD FAILED in 1s

And my Ionic info :
$ ionic info
✔ Gathering environment info - done!

Ionic:

ionic (Ionic CLI) : 4.1.2 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.0

Cordova:

cordova (Cordova CLI) : 8.1.1 (cordova-lib@8.1.0)
Cordova Platforms : android 6.3.0, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic 2.0.4, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 18 other plugins)

System:

Android SDK Tools : 26.1.1 (/Users/sandramendoza/Library/Android/sdk)
NodeJS : v8.11.4 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Sierra

Any help, I'll appreciate :)
Thanks :)

I do the following steps:

ionic cordova platform rm android

then I remove the folder 'node_modules' and the file 'package_look.json'. After that I change 'package.json':

run
npm install
sudo chown -R $USER to my project
ionic cordova platform add android@6.3.0
cordova prepare
ionic cordova build android

After that I get a new error:

  • 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/internal/zzex;

And I found this

change my build.gradle to:

path: android/build.gradle

defaultConfig {
minSdkVersion 21
targetSdkVersion 26
multiDexEnabled true
}

And it works ok.

Thanks for the information and the update on your issue :)