Request to Increase DEX Limit in MIT App Inventor

I'm encountering an issue with the DEX limit during the build process. My project heavily utilizes Bluetooth connectivity alongside a virtual screens.

To maintain Bluetooth connectivity and the seamless transition between virtual screens, I've optimized my code as much as possible. Despite these efforts, I'm unable to proceed further due to the DEX limit constraint.

I'm reaching out to inquire if there exists any possibility of increasing the DEX limit within MIT App Inventor. This enhancement would immensely benefit developers who rely on complex connectivity features, allowing for more expansive and efficient application development.

P.S It's noteworthy that the application compiles and operates seamlessly within the MIT App Inventor Companion. The issue arises specifically during the build phase.

How many blocks are there in your screen?
How many components like labels, buttons, textboxes, arrangements etc do you use?

Here is a tool to get some statistics about your app https://unchive.kodular.io

Also please post the log of tje build process...

Taifun

Total Blocks 10145
label 304,buttons 150,textbox 26,arrangments 543

So many buttons and arrangements maybe you should re think your design and create them dynamically using CombCreator extension by @Kevinkun or Dynamic components extension by @yusufcihan

As mentioned above, you have reached the memory limit for the compiler. You can try to compile the project on a code server. But I think that with such an amount of components and blocks, a code server will not be able to handle it. You need to rethink your design and try to reduce the number of components and blocks.

Learn to use lists and tables.

How many components are needed to travel from the Big Bang to MIT?

Thank you for your previous suggestions and guidance. I deeply appreciate your support.

I wanted to share that I've diligently optimized my application utilizing every available technique within MIT App Inventor to ensure its compactness and efficiency. I've extensively employed component procedures and leveraged lists to streamline the application, maximizing its performance within the limitations of the platform.

However, despite these efforts, I find myself unable to progress further due to the persistent DEX capacity limitations. I firmly believe that an artificial constraint on the DEX limit should not inhibit developers from expanding their applications to meet growing demands.

Developers often encounter scenarios where ambitious projects necessitate more classes and functionalities, and hitting the DEX capacity becomes a roadblock. Hence, I strongly advocate for a solution that ensures developers aren't restricted when aiming to create larger and more complex applications.

I truly appreciate the efforts put into MIT App Inventor, and I believe addressing the DEX limit challenge would significantly enhance the platform's capabilities, empowering developers to explore broader horizons in application development.

I'm grateful for your attention and understanding regarding this matter and look forward to any insights or potential resolutions to overcome the DEX capacity constraints.

Thank you for your continuous support and dedication to enhancing MIT App Inventor.

I still don't understand what error you get while building apk.
Show build log.

You have not yet exhausted all techniques to shrink an app's block count.

Try using the Activity Starter to modularize the app into separate projects, communicating by start and return values.

Convert logic into JavaScript in Media folder HTML files.

Look for the if/then/elseif block with the most branches and find a way to break it up or tabularize it.

Did you try the code server? The ai2 server has time limits for compilation, which are far exceeded on the code server. Also you do not show your compile error screen....

The dex limits are not limits imposed by App Inventor but rather the Android dex format, where many items are limited to either 2^16 or 2^32 items based on the design of that format. If you're getting an error that the dex limit has been exceeded there isn't much we can do about that. You will have to really think hard about how to decompose your app in such a way that it might be broken down into smaller pieces.

Thank you for providing insight into the inherent limitations of the Android DEX format and the challenges associated with the DEX limit in Android applications.

I understand the fundamental restrictions imposed by the DEX format and the associated design constraints. Your suggestion to decompose the application into smaller segments is duly noted, and I'll explore ways to restructure the app to alleviate the DEX limit concerns.

However, I'd like to seek further guidance or suggestions on effective strategies for decomposing the application without compromising its core functionalities. Are there specific approaches or techniques you recommend for breaking down the app into smaller pieces while maintaining its integrity and functionality?

Additionally, I'd appreciate any resources or references that might provide insights into managing larger applications within the DEX limitations of the Android platform.

I'm grateful for your continued support and advice regarding this matter.

Thank you for your time and assistant

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia

1 Like

If you don't want to post your .aia file, you can use this site to extract just the blocks for analysis:

Unchive