PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WM 20 android] Error trying to generate apk file
[WM 20 android] Error trying to generate apk file
Iniciado por guest, 21,sep. 2015 20:19 - 6 respuestas
Publicado el 21,septiembre 2015 - 20:19
I would appreciate if someone could help me solve this problem,

I am getting the following error, I tried WM19 and get the same error.
This are projects already working in WM 19

Failure creating the Android application named .


Command Line: "C:\Program Files (x86)\Java\jdk1.8.0_11\in\java.exe" -Xmx1024m -Xss1m -Djava.ext.dirs=.\uild-tools\21.1.2\lib -jar .\uild-tools\21.1.2\lib\dx.jar --dex --incremental --output="C:\My Projects Mobile 20\PMXact\Android\Generation\in\classes.dex" "C:\My Projects Mobile 20\PMXact\Android\Generation\in\classes" "C:\My Projects Mobile 20\PMXact\Android\Generation\libs"


Error returned:
Error occurred during initialization of VM
Could not reserve enough space for 1048576KB object heap
Publicado el 21,septiembre 2015 - 20:35
Hi Andres,

from the error message, I would think that your project got too big...

I think that PCSoft has a faq available about that problem, but you can probably compile by using the "optimize the apk" checkbox (slower) in the compile process

Best regards
Publicado el 21,septiembre 2015 - 21:19
Hi Andres,
WM20 has an option to "reduce the size of the generated code" somewhere in the generation wizard (advanced options from the top of my head). It helped in my situation.
Please don't ask why such an option is there in the first place. I would say we always want to optimize our code.....
Publicado el 22,septiembre 2015 - 00:46
Hi Fabrice:

>>from the error message, I would think that your project got too big...

I probably think the same way, but my project has 6 windows and 1 class.

I tried the optimize option, with no luck

Thanks

Andres Sanchez
Publicado el 22,septiembre 2015 - 00:47
Arie:

Thanks for you help, I have tried that option and still getting the error.

Andres Sanchez
Publicado el 22,septiembre 2015 - 08:44
Hi,

You need to change the -Xmx1024m parameter because it is probably the Java compiler that runs out of heap while compiling your application.

You can change this in this file: C:\WinDev Mobile 20\Programs\Framework\Android\WDJava.dat

Change alle occurences of -Xmx1024m to -Xmx4096m

Then restart Windev Mobile and fully recompile your application.

Other options are that you use the 64bit Java compiler.

Hope this works for you !
Danny
Publicado el 22,septiembre 2015 - 16:11
Danny:

There was no -Xmx1024m in the file, instead it was a -Xmx$JavaXmx$ which i changed to -Xmx4096m and there was a different error, so I installed JRE 64-bit and that SOLVED the problem

Thanks, to all

Andres Sanchez