Android Question issue solved

ilan

Expert
Licensed User
Longtime User
 

Peter Simpson

Expert
Licensed User
Longtime User
Darnit,
I thought that #VirtualMachineArgs was also in B4A as #VirtualMachineArgs is in B4J.

Sorry about that @ilan, I'm just replying on my phone, grrr...

Maybe that would make a nice feature request in the wish list, but there's probably another way around it.
 
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
You can try to change limit for Dex
MaxRamForDex=4092
in file
c:\Users\<YOUR_USER>\AppData\Roaming\Anywhere Software\Basic4android\b4xV5.ini
You also need to have x64 Java SDK, as Dex cannot use this amount of ram with x86 java SDK.
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
Hiya @ilan
Hmm, I've just got back in and thought to myself that you can probably use Windows environment variables to fix your problem.

My variables already have the following setup '-Xmx1024m -Xms1024m', You can just add more options like '-XX:-UseGCOverheadLimit'.



I've just decided to add '-XX:-UseGCOverheadLimit' to the end of my _JAVA_OPTIONS variables, so now mine reads as follows
'-Xmx1024m -Xms1024m -XX:-UseGCOverheadLimit', give it a go it will not hurt.

When ran in B4J the logs will say that it has pick up Java options, nothing appears in B4A logs when ran but java options are still executed.

That's my way of fixing memory issues and using java options, yes there are other ways to do it but this works for me.

I believe that using #VirtualMachineArgs in B4J is basically the same as setting it up as in the screenshot above. it would be nice to have #VirtualMachineArgs in B4A, but it does not have it so I use Windows environment variables.

This is where Erel responds by saying there is an easier way , but this way it's set all the time when Windows is loaded.
 
Last edited:
Upvote 0

ilan

Expert
Licensed User
Longtime User
thanx for all answers here. i have tried to increase the dexmemory value in the ini file but it doesnot help and also i noticed that it is set back to 1024 after compile. i am not sure what is setting that value back.

the error message also get more and more weird:


i have tried to use b4a8.5 again but now it also doesnot compile there. the weird thing is that i compiled 5 days ago successfully so why is it not working now???
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
why is it not working now???
because you now use another SDK Installation.

Seems that it is related to the libraries you are using inside your project maybe.

To your issue: Try to reproduce the problem in a small new project and upload this project.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
because you now use another SDK Installation.

Seems that it is related to the libraries you are using inside your project maybe.

To your issue: Try to reproduce the problem in a small new project and upload this project.

if i run other project they work. what i also tried is running this specific project on my other laptop and there it does compile. the thing is that the ini in that pc has 4096 set to maxdex and when i set the same value to my new laptop it is not stored. after compile the ini is always set back to 1024.

do i need to set it to read only after changing it?
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
do i need to set it to read only after changing it?

hmmm.... ok now that worked. so the reason was that the compile always set back the ini file to 1024 after changing it to 4096 and read only it is now working.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
Make sure to edit the ini file while NO IDE is running at this time.

yeah maybe thatsthe problem. i just figured out that the ini cannot be readonly because the ide saves stuff to it so changed back to make it writeable and the 4096 is still there and the app build is successfully. so the problem was maybe that i changed it while ide was running and it always set it back to 1024.

thanx to all of you guys
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
This error has nothing to do with v8.80. It is unfortunate that you set the title to "since b4a 8.80 only troubles " as you are causing developers to avoid using the latest version for no good reason.

ok, you can delete this thread.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…