web-dev-qa-db-fra.com

Processus 'commande'/Applications/Android Studio 3.0.1.app/Contents/jre/jdk/Contents/Home/bin/Java '' terminé avec une valeur de sortie non nulle 1

Je suis tombé sur un problème lorsque j'ai utilisé Android Studio pour importer un projet.Plus de détails ci-dessous: `` `

Error:Execution failed for task ':app:transformClassesWithDexForArmDebug'.
> com.Android.build.api.transform.TransformException: com.Android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/bin/Java'' finished with non-zero exit value 1
```

And the Gradle console show the following message:

---------
Executing tasks: [:app:assembleArmDebug]
Configuration on demand is an incubating feature.
:app:copyJniLibsArmDebugMainJniLibs UP-TO-DATE
:app:armDebug UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preArmDebugBuild UP-TO-DATE
:app:checkArmDebugManifest
:app:preArmReleaseBuild UP-TO-DATE
:app:prepareCjtLibraryWheelCamera019Library UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2531Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72531Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72531Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2531Library UP-TO-DATE
:app:preArmDebugAndroidTestBuild UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72531Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCompat2531Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUi2531Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUtils2531Library UP-TO-DATE
:app:prepareComAndroidSupportSupportFragment2531Library UP-TO-DATE
:app:prepareComAndroidSupportSupportMediaCompat2531Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42531Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2531Library UP-TO-DATE
:app:prepareComAndroidSupportTransition2531Library UP-TO-DATE
:app:prepareComBlankjUtilcode134Library UP-TO-DATE
:app:prepareComCjjMaterialrefeshlayoutLibrary130Library UP-TO-DATE
:app:prepareComDaimajiaAndroidanimationsLibrary113Library UP-TO-DATE
:app:prepareComDaimajiaEasingLibrary101Library UP-TO-DATE
:app:prepareComDanikulaVideocache264Library UP-TO-DATE
:app:prepareComDevbracketsAndroidExomedia301Library UP-TO-DATE
:app:prepareComEdmodoCropper101Library UP-TO-DATE
:app:prepareComFlycoTablayoutFlycoTabLayout_Lib212Library UP-TO-DATE
:app:prepareComGetbaseFloatingactionbutton1101Library UP-TO-DATE
:app:prepareComGithubChrisbanesPhotoView130Library UP-TO-DATE
:app:prepareComGithubCtiaoDanmakuFlameMaster0912Library UP-TO-DATE
:app:prepareComGithubJmolsmobileLandscapevideocamera107Library UP-TO-DATE
:app:prepareComGithubSatyanSugar15Library UP-TO-DATE
:app:prepareComGoogleAndroidExoplayerExoplayerR159Library UP-TO-DATE
:app:prepareComJaydenxiaoGuider100Library UP-TO-DATE
:app:prepareComJcodecraeerXrecyclerview132Library UP-TO-DATE
:app:prepareComMakeramenRoundedimageview230Library UP-TO-DATE
:app:prepareComMalinskiySuperrecyclerview114Library UP-TO-DATE
:app:prepareComOrhanobutLogger115Library UP-TO-DATE
:app:prepareComPgyersdkSdk254Library UP-TO-DATE
:app:prepareComPingxxPingppAlipay218Library UP-TO-DATE
:app:prepareComPingxxPingppCore218Library UP-TO-DATE
:app:prepareComPingxxPingppWxpay218Library UP-TO-DATE
:app:prepareComRengwuxianMaterialedittextLibrary214Library UP-TO-DATE
:app:prepareComScwangSmartrefreshSmartRefreshHeader103Library UP-TO-DATE
:app:prepareComScwangSmartrefreshSmartRefreshLayout103Library UP-TO-DATE
:app:prepareComSerenegiantCommon119Library UP-TO-DATE
:app:prepareComZhyOkhttputils262Library UP-TO-DATE
:app:prepareDeHdodenhofCircleimageview210Library UP-TO-DATE
:app:prepareJpWasabeefGlideTransformations202Library UP-TO-DATE
:app:preparePubDevrelEasypermissions020Library UP-TO-DATE
:app:prepareArmDebugDependencies
:app:compileArmDebugAidl UP-TO-DATE
:app:compileArmDebugRenderscript UP-TO-DATE
:app:generateArmDebugBuildConfig UP-TO-DATE
:app:generateArmDebugAssets UP-TO-DATE
:app:mergeArmDebugAssets UP-TO-DATE
:app:generateArmDebugResValues UP-TO-DATE
:app:generateArmDebugResources UP-TO-DATE
:app:mergeArmDebugResources UP-TO-DATE
:app:processArmDebugManifest UP-TO-DATE
:app:processArmDebugResources UP-TO-DATE
:app:generateArmDebugSources UP-TO-DATE
:app:compileArmDebugJavaWithJavac UP-TO-DATE
:app:compileArmDebugSources UP-TO-DATE
:app:transformClassesWithJarMergingForArmDebug UP-TO-DATE
:app:collectArmDebugMultiDexComponents UP-TO-DATE
:app:transformClassesWithMultidexlistForArmDebug UP-TO-DATE
:app:transformClassesWithDexForArmDebug

ERREUR D'ANALYSE:

unsupported class file version 52.0
...while parsing com/a/a/a.class
PARSE ERROR:
unsupported class file version 52.0
...while parsing com/a/a/b.class
2 errors; aborting
 FAILED

    FAILURE: Build failed with an exception.
    * What went wrong:

Execution failed for task ':app:transformClassesWithDexForArmDebug'.

com.Android.build.api.transform.TransformException: com.Android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: processus 'commande' /Library/Java/JavaVirtualMachines/jdk1.8.0_161. jdk/Sommaire/Accueil/bin/Java '' termine avec une valeur de sortie non nulle 1 * Essayez: Exécuter avec l'option --stacktrace pour obtenir la trace de la pile. Exécutez-la avec l'option --info ou --debug pour obtenir davantage de sorties de journaux . ÉCHEC DE CONSTRUCTION Temps total: 39,744 secondes


Ce projet Android peut fonctionner correctement sur un autre ordinateur, mais pas sur le dernier. J'espère que vous pourrez m'aider à résoudre ce problème ou me faire des suggestions, merci d'avance.

7
J.su

Essayez d'ajouter ce code pour build.gradle> Android

dexOptions {
    javaMaxHeapSize "4g"
}
1
Pouriya Khalaj

Cette erreur est liée aux dépendances com.google.firebase et com.google.Android.gms.

Mettez-les à niveau avec leurs dernières versions et le problème sera résolu.

0
Mojtaba Hajishah

Je viens de vivre le même problème. Ma solution était de:

"build > Clean project"
"build > Generate signed APK"

Ensuite, la construction a été réussie.

Les options dexOptions ont également été définies dans le fichier mij build.gradle.

dexOptions {
    javaMaxHeapSize "4g"
}
0
Bert Maurau