Why can't compile the APK file? Error message is: DX execution failed

Why can’t I compile the APK file? The program I wrote on October 27, 2018 can be compiled~~ Now I can’t compile the apk file after recompiling, and the error message appears as the attachment file, but if I have a subroutine If you disable it, you can compile and generate the apk file. Does the version change have a limit on the number of blocks?

How can I solve it?

Thanks

1 Like

There isn’t a limit on the number of blocks. Can you show us an example of the subroutine that, if disabled, allows the app to compile correctly? Usually when this happens there is an empty socket that needs to be filled.

Also, there wasn’t an attachment in your post.

Sorry, I forgot to upload the attachment file. If I disable button 1 or print_1, I can generate the APK file.

On rare instances, we do end up hitting a memory limit for large projects. Do you have a sense of how many blocks you have? With your permission, we can also run some tests on the project and see if we can pinpoint the problem.

your error message is DX execution failed

here is SteveJG’s monster list of things to check https://groups.google.com/d/msg/mitappinventortest/fLiMEfPh09Q/1Ia0AaQEXogJ

each point on the monster list might be the issue, why someone gets a DX execution failed error… that thread is a collection of several possibilities, which have been collected by SteveJG during the years while answering questions like that… hope that helps…

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

2 Likes

I think we should make this monster list into a guide on this forum to link to.

2 Likes

I agree how to test? For example, print_1 has a total of 4,184 program blocks, as shown in the figure. If the print_1 subroutine is disabled, compile ok.

You must learn how to use data tables to drive your app.
It will reduce your block count considerably,
and make your app more flexible.

Sample apps:
https://docs.google.com/document/d/1S8eZBKBvtFzafH51a3bKnw_iBVHRnjHaEY1Zbjzscb0/edit?usp=sharing

I understand that I will improve again, but why the same program can be compiled on October 27, 2018, but not now?

Running AI2 is like driving a truck down a highway with overpasses of various heights,
comparable to running programs in environments with competing memory limits and usages.

Sometimes the truck will have more air in its tires and ride higher, or the highway has been repaved a little higher but the bridges over it not raised, and trucks that passed safely before now get stuck under an overpass.

Your browser and the AI2 servers constantly change, even though your program might have stayed the same.

I have read posts suggesting Firefox 70 runs quicker under situations with a lot of blocks.
(I have not tried it, and still recommend reworking your program to use data tables.)

1 Like

A post was split to a new topic: Your build failed due to an error in the DX stage