Hello,my project is unable to complete apk Build and i get an error message DX execution faild , but in AI Companion it working with no problem (compile successfully)
After a lot of time checking i found out that :if i dsiable a few block (doesnt matter which) the building process is successfully completed.
I have a lot of blocks in one page
In offline version everything works fine.
With my litle knowledge i thing the problem is java.lang.OutOfMemoryError: Java heap space
and to fix it you must change to -Xmx2048m for the building apk process to work
There are a lot of reasons for why the DX error occurs, most notably you have a lot of something. You said that you have a lot of blocks on one screen, which may be the issue.
Exactly. The average user never needs more than 2K blocks. You will start to experience lags in the Blocks editor when you reach around 1K blocks, depending on what device and what browser you're using.
Look for the following to reduce the amount of blocks you have:
Are there too many virtual screens? Can you split some into real screens?
Do you have long bits of code where you repeated a lot of things? Try procedures, or lists with iterator loops (for-each, for-each-number).
if i set up bluetooth connection in screen 2 for example and if i change to real page then do i have to reintilalise the bluetooth (it will disconnect?) or it will continiue to sending and recieving data?
You are using a third party program and I think you have to stick with that as there may well be incompatibility issues. Why are you even even seeking out help with App Inventor if your Offline program is working fine?
If you have set it up on a Screen, then swap screens, Bluetooth is lost. This is because the Screens are effectively individual programs that do not share the same memory allocation.