Error when building the app with latest update

I think any App must have some blocks per screen to be bona fide.

Hmm - why would it take a long time to build 10 screens without blocks? Are there many media files?

@Taifun: Well, in this case we are already helping a commercial entity free of charge. We would want the forum to have some benefit and that would normally be being able to follow the Topic and see corrected blocks etc. If everyone starts sending their Projects via PM, all that is lost.

1 Like

@wiki74 1mb is large for a media file. How many exactly is “not many”? What type of files are they?

I did a little experimenting. I imported your aia into AI and first i just deleted the biggest screen and i was able to build your apk. You have in total more then 19000 blocks in your app.

Then i removed your project and imported it again. I saw you are using some of Taifuns extensions. Some of them are out of date.

You have Tools, Wifi and Mail. Wifi and Mail are out of date. When i wanted to update Wifi i got this message.

Selection_999(1001)

So i deleted the Mail extension and i was able to build the apk.

Then i wanted to update the wifi extension and got this message

image

I don’t know if the problem of not building was caused by the mail extension. I could also be that enough blocks were deleted when i removed the extension that the apk build.

Maybe you can test for yourself if you are able to build if you remove the mail extension. Since you bought the extension from taifun i guess you can ask him for the latest one.

Edit:
I did a last test. I can remove the tools and wifi extension and still get the error message. Only after removing the mail extension the app builds.

I know the problem that extensions can no longer be updated in AI2. Then try to open the aia file with winzip (etc.) and copy / replace the extension from another new aia.

1 Like

First of all thank you fery much @all, I couldnt repeat yesterday due to forum restrictions which blocked me 16 hours to respond…

Thats interesting as there are not many blocks for the mail extension, I will try to find another solution for mailing

EDIT: Deleted the Mail Extension and still not working :frowning:

I know, I will try to minimise in the next days and rewrite some parts.

Its 1Mb in total @ChrisWard

But WHY was it able to build the app in complete 2019 and now it does not work even though nothing changed in the app?

I think that will certainly help. I didn’t look at all the blocks but maybe this can give you an idea

I suggest you start a brand new Project - and before doing anything in App Inventor, write down on paper which features are absolutely required and which are luxury and not really needed - ditch those from the design (be ruthless!). Also review how the App works, keep the GUI as simple as possible.

Having decided what is really required, do not simply return to using Umpteen Screens. First of all, see the FAQ on how to use Virtual Screens.

When building the block code, you can use separate “mini Projects” to test as you go along - do not wait until the entire Project is “finished”, only to discover that it doesn’t build or doesn’t run as intended. Think ahead when defining Block code - you have the original Project for reference, always ask yourself “is there a better way to do this?”.

I did some tests with the aia and it actually seems to be due to the number of blocks. As soon as I remove some block-heavy screens, the app will compile (in a few sec).
Removing the extensions doesn’t help.

Therefore, it would certainly help to reduce the number of blocks if “Any Componten” blocks were used instead of frequently repeated blocks (and there are a lot).

That’s one of the puzzles of AI and the other builders. Sometimes something works for one and not for the other. :grin:

I had just to remove the mail extension to make it work.

In a PM, We have already concluded it is the amount of blocks. I have suggested the Use of a Single ListView to replace 249 buttons, 249 Text Boxes and 249 Arrangements.

I think raising a PM should be limited to Power Users. Users are already using PMs when there is no need and other Users cannot learn from posts they cannot see.

Remarks removed

Finally I did it…

Removed many Arrangements, Labels, Textboxes and Checkboxes and done some Parts with the Any Component and now its compiling again!!!

Thanks again for the Tipps and the help!!!

I have the same problem. I added a lot of horizontal and vertical layouts to the application to customize the look. I can’t compile the application now. Is there a chance to work around the problem without removing the layouts?

I guess it depends what you mean by “a lot”(10, 100?), and then everything else your app might be doing?

Are you able to replicate this, e.g. a blank project with “a lot” of arrangements that won’t compile ?

Built apps with 25,50 and 100 arrangements (mixed) on single screen. No issues.

In one VerticalScrollArrangement over 1000 other Arrangement with labels and text fields. After removing the arrangements part, the problem disappeared. I also used the arrangements to make black frames around the text boxes but I had to give it up although it looked nice.

After deleting the layouts, the .aia file has not shrunk but is already compiling.

I also tried the Kodular creator and I have a log. There was a similar log in AppInventor:

The compiler error output was
________Checking dangerous extensions
________Preparing application icon
________Creating animation xml
________Creating fragment of xml
________Creating listview xml in res / layout / …
________Creating listview xml in res / layout-v21 / …
________Creating xml in res / drawable / …
________Creating splash png in res / drawable / …
________Creating colors xml
________Creating styles xml
________Creating drawables xml v21
________Checking for firebase
________Creating provider_path xml
________Creating network_security_config xml
________Generating adaptive icon file
________Generating round adaptive icon file
________Generating adaptive icon background file
________Generating manifest file
________ Attaching native libraries
________ Attaching Android Archive (AAR) libraries
________ Attaching component assets
________Invoking AAPT
AAPT time: 0.921 seconds
________Compiling source files
(compiling io / kodular / froniu84a / Configurator_LWPMa / Screen1.yail to io.kodular.froniu84a.Konfigurator_LWPMa.Screen1)
(compiling /tmp/runtime5449954267369594796.scm to com.google.youngandroid.runtime)
Coffee compile time: 5.298 seconds
________Invoking DX
YAIL compiler - DX execution failed.
.

Just the one screen in the app ?

Yes. I don’t use real screens at all, too many problems with them. Because of this I have a lot of arragements, but it probably causes a problem.