PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV Mobile 2024 → Gradle daemon needs larger heap size
Gradle daemon needs larger heap size
Iniciado por Niels, jun., 20 2017 10:26 AM - 8 respostas
Publicado em junho, 20 2017 - 10:26 AM
Bonjour,

j'essaie de compiler mon project mais ca affiche cet erreur.


Erreur retournée :


Running dex as a separate process.

To run dex in process, the Gradle daemon needs a larger heap.
It currently has 1024 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to at least 1536 MB (based on the dexOptions.javaMaxHeapSize = 1024m).
To do this set org.gradle.jvmargs=-Xmx1536M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html

Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/feitianBLE/reader/devicecontrol/Atr_t;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/feitianBLE/reader/devicecontrol/Atr_t$_ib;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/feitianBLE/reader/devicecontrol/BleCard;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/feitianBLE/reader/devicecontrol/CardCmd;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/feitianBLE/reader/devicecontrol/Catr;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/feitianBLE/reader/protocol/IProto;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/feitianBLE/reader/protocol/I_Packed;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/feitianBLE/reader/protocol/ProtocolExtended;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/feitianBLE/reader/protocol/ProtocolT0;
Dex: Error converting bytecode to dex:
Cause: java.lang.RuntimeException: Translation has been interrupted
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:613)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
Caused by: java.lang.InterruptedException: Too many errors
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:605)
... 4 more

:transformClassesWithDexForDebug FAILED


J'ai cherché sur google et j'ai essaié de changer mon build.gradle file pour ca mais le valeur originale retourne quand je compile mon projet.

Cordialement,

Niels
Publicado em junho, 20 2017 - 1:04 PM
Hi. You don't need change the project options to configure Gradle behaviour. You can create a gradle.properties file in <folder windows user>\.gradle folder

The file content can be for example:

# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Settings specified in this file will override any Gradle settings
# configured through the IDE.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# The Gradle daemon aims to improve the startup and execution time of Gradle.
# When set to true the Gradle daemon is to run the build.
# TODO: disable daemon on CI, since builds should be clean and reliable on servers
org.gradle.daemon=true

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
org.gradle.jvmargs=-Xms1g -Xmx6g -XX:MaxPermSize=1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html…
org.gradle.parallel=true

# Enables new incubating mode that makes Gradle selective when configuring projects.
# Only relevant projects are configured which results in faster builds for large multi-projects.
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html…
#org.gradle.configureondemand=false

org.gradle.java.home=D:\\Program Files\\Java\\jdk1.8.0_131

org.gradle.workers.max=16

com.android.build.gradle.overridePathCheck=true

com.android.build.gradle.overrideVersionCheck=true

#startParameter.offline=false


You must change the java folder and your memory and CPU cores/threads usage by Gradle. More memory then more speed.


Rubén
Publicado em julho, 03 2017 - 12:22 PM
Bonjour,
J'ai exactement le même message, dans mon projet ce matin , en ajoutant une fenêtre avec un champ carte.
Avez-vous trouvé la solution. Merci d'avance.
Membro registado
151 mensagems
Popularité : +7 (7 votes)
Publicado em julho, 06 2017 - 1:14 PM
Même problème en ajoutant des dépendances Maven, je suis coincé et espère une solution.

Meilleures salutations.
Publicado em outubro, 03 2017 - 10:11 AM
Bonjour,

J'ai également ce problème. J'ai ess ayé de recréer le fichier comme indiqué mais rien n'y fait. Avez vous trouvé une solution?

PCsoft en pense quoi ?

Laurent
Membro registado
51 mensagems
Popularité : +1 (1 vote)
Publicado em julho, 18 2018 - 10:54 AM
Idem pour moi.
Avez vous réussi à résoudre le problème ?
Membro registado
106 mensagems
Popularité : +3 (3 votes)
Publicado em julho, 23 2018 - 5:29 PM
Bonsoir,

moi aussi j'ai ce soucis depuis mercredi 18/07/18 ...
et quand je générè mon apk depuis le poste d'un collègue, pas de soucis..

Une idée svp ?

--
- ian -
Membro registado
794 mensagems
Popularité : +40 (42 votes)
Publicado em julho, 23 2018 - 6:46 PM
Salut. Il suffit d'utiliser les fichiers texte gradle.properties que j'ai indiqué ci-dessus. Vous devrez configurer la ligne JDK en fonction de votre version et de la quantité de mémoire en fonction des possibilités de votre PC. Dans mon cas, c'est 16 Go. La ligne importante est celle qui commence par "org.gradle.jvmargs".

Ma configuration actuelle pour WM23 est :

# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Settings specified in this file will override any Gradle settings
# configured through the IDE.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# The Gradle daemon aims to improve the startup and execution time of Gradle.
# When set to true the Gradle daemon is to run the build.
# TODO: disable daemon on CI, since builds should be clean and reliable on servers
org.gradle.daemon=true
org.gradle.daemon.idletimeout=3600000

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
org.gradle.jvmargs=-Xms1g -Xmx8g -XX:MaxPermSize=1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html…
org.gradle.parallel=false

# Enables new incubating mode that makes Gradle selective when configuring projects.
# Only relevant projects are configured which results in faster builds for large multi-projects.
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html…
org.gradle.configureondemand=false

org.gradle.java.home=C:\\Program Files\\Java\\jdk1.8.0_172

#org.gradle.workers.max=6

com.android.build.gradle.overridePathCheck=true

com.android.build.gradle.overrideVersionCheck=true

org.gradle.caching=true

#startParameter.offline=false
Membro registado
51 mensagems
Popularité : +1 (1 vote)
Publicado em julho, 24 2018 - 10:41 AM
Dans mon cas, le fichier gradle.properties se met à jour automatiquement lors de la compilation et les lignes que j'ajoute se suppriment elles-mêmes.
Je penses que mon souci vient du peu de RAM présente sur mon poste (4go).
Merci tout de même pour votre partage :merci:
Mensagem modificada, julho, 24 2018 - 10:42 AM