dove...@yahoo.co.uk

unread,
Jun 17, 2016, 2:25:25 PM6/17/16
to MIT App Inventor Forum
My app will not build with the error report shown below. I have gone through the checklist that was posted on these forums (about 12 things to check) and still i have a build error. The build is not over 5mb as i build after every session for back up reasons and its been around the 3.8mb mark last few days. There are no red or yellow triangles and all blocks are filled in and like i say i build every night and i only added a few blocks before i built again and now the error.

Can anyone look at my error report below and give me any clues as to what it may be. My app is large on blocks but not on images, ive also collapsed all blocks to try and keep the speed of app inventor up.

Thanks for any help






App Inventor is unable to compile this project. 
The compiler error output was 
________Preparing application icon
________Creating animation xml
________Determining BR names and actions
________Generating manifest file
________Attaching native libraries
________Attaching component assets
________Compiling source files
(compiling appinventor/ai_doveyy04/cardfootball/Screen1.yail to appinventor.ai_doveyy04.cardfootball.Screen1)
(compiling appinventor/ai_doveyy04/cardfootball/Screen2.yail to appinventor.ai_doveyy04.cardfootball.Screen2)
(compiling /tmp/runtime4586232710561937926.scm to com.google.youngandroid.runtime)
Kawa compile time: 4.816 seconds
________Invoking DX
YAIL compiler - DX execution failed.
.

dove...@yahoo.co.uk

unread,
Jun 17, 2016, 2:55:26 PM6/17/16
to MIT App Inventor Forum
Oh and also I tried my other projects and they build fine.

Also I've just tried to connect to AI companion and it says Failed to connect to ai2 etc... I have the latest version that updated yesterday to 2.37 !!!

dove...@yahoo.co.uk

unread,
Jun 19, 2016, 3:37:52 AM6/19/16
to MIT App Inventor Forum
Ok not much response for my problem so I decided to try some things...

I back tracked my work since last build complete by deleting 1 set of blocks at a time which were either a procedure or a when timer do and then I attempted a build each time. Once I got to a point where the build was complete I double checked the set of blocks I had just deleted previously to see if that was the issue but could find no problems so I did the whole process again and the build complete/error came down to that exact point again.

So I added a new set of blocks onto the point where the build was complete and the build failed!! I also added plenty more timers as I had originally deleted the timer components when deleting the when timer block to see if it was that I was using to many timers but this was not the case.

So only conclusion for me if that I seem to have reached a limit in block use, the overall size of the build right before build fail is 3.8 mb so it's not a fail because of that its a fail because of a number of blocks.

So do we know of a block limit?

Ghica

unread,
Jun 19, 2016, 7:06:11 AM6/19/16
to MIT App Inventor Forum
Just curious: how many blocks do you have and how many screens?
Maybe some rework by using more procedures etc. could help to bring the number of blocks down?
Cheers, Ghica

dove...@yahoo.co.uk

unread,
Jun 19, 2016, 7:56:28 AM6/19/16
to MIT App Inventor Forum
A lot of blocks .... A hell of a lot. I'm using procedures wherever possible and have trimmed down where I can but to be honest I'm trying to build an app that is probably to big for app inventor 2. I've done a few more tests and it does seem to change to build error as soon as I add a few more blocks to my program.

Ghica

unread,
Jun 19, 2016, 8:51:43 PM6/19/16
to MIT App Inventor Forum
I have put out a question to more knowledgeable people about this.
Cheers, Ghica.

Taifun

unread,
Jun 19, 2016, 9:01:56 PM6/19/16
to MIT App Inventor Forum
your error message is DX execution failed and if you do a search in the forum you will find several tips, see here https://groups.google.com/forum/#!searchin/mitappinventortest/DX$20execution$20failed

A lot of blocks .... A hell of a lot.
a hell lot of blocks might be too much... ;-)
so how many blocks do you have and how many screens?

the secret is to reuse your components!
there might be some redundancy in your project?
probably it helps to read chapter 19 - 21 in Dave's book http://www.appinventor.org/book2 to get an idea how to do DRY programming with App Inventor https://en.wikipedia.org/wiki/Don%27t_repeat_yourself

and have trimmed down where I can
an example screenshot probably could help us to help you...

Taifun

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


Ghica

unread,
Jun 19, 2016, 9:27:30 PM6/19/16
to MIT App Inventor Forum
I am copying here the reply from Jeff Schiller:
I saw that question and have been thinking about it. There is no inherent limit on the number of blocks. However there are various limits, including some imposed by Android itself.

The build output showed that the Kawa Compiling stage completed, so the blocks are "good" and compiled to byte code without an error. But the "dx"ing step failed. There isn't enough information in the displayed output to know the cause (it would help if we could get the .aia file, I can do some compilation with more debugging turned on). However if I had to guess, I would say we are exceeding the 65,536 method limit imposed by Android. We added a feature a few months ago to avoid this limit in many cases by adding a second "dex" file (we needed to do this for Firebase).  However all of the App Inventor components and user compiled code still has to fit in the first dex file.

Interestingly, having more procedures may make this worse, as I believe a procedure maps to a "method" which counts against the 65,536 limit. However you would likely need in excess of 1,000 procedures to hit this limit. Now that would be a large number of blocks!
=================

If you are willing to provide your .aia he may be able to experiment with it.
Cheers, Ghica.


dove...@yahoo.co.uk

unread,
Jun 21, 2016, 5:09:18 PM6/21/16
to MIT App Inventor Forum
Hi guys, thanks for the reply and the offer to help with my issue.

I'm sure it's possible to shrink my program more despite my attempts to but to be honest I think my project is too big for app inventor (possibly too big for me). Even if I shrink my program in half I'm still only about a third of the way into it and for a while now app inventor has been very very slow specially when scrolling the blocks screen, this is with all blocks collapsed. It become unusable.

I'm afraid I need to use other app building kit to continue with my project. I like app inventor, it's a great idea for building simple apps and very user friendly but it's no good for larger apps as its very limited.

Thanks again for the help

Taifun

unread,
Jun 21, 2016, 5:49:31 PM6/21/16
to MIT App Inventor Forum
 I think my project is too big for app inventor
without following some simple rules like DRY and reusing components, you will get the same issues in other tools, too
this also could help Building apps with many screens
 
A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  
How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling  .

Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the
 Top 5 Tips: How to learn  App Inventor

You will not find a tutorial, which does exactly what you are looking for. But doing the tutorials (not only reading a little bit) help you to understand, how things are working. This is important and this is the first step to do.

Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by  Taifun.         



Reply all
Reply to author
Forward
0 new messages