Skip to first unread message

Alex Dag

unread,
Mar 14, 2015, 9:10:56 AM3/14/15
to mitappinv...@googlegroups.com
Hello, im working my app in MIT app Inventor 2 and i cannot download it.[built(save .apk in computer)].
It works fine when i run it with wifi from laptop/phone.
As i have read, the Mit App Inventor 2 is for apps only >5MB.(Is that true?)
Well, in my app, i have 17 images(.jpg) and 7 Screen.
When i press built(save .apk in computer load to 10% and then a error appear:
App Inventor is unable to compile this project. 
The compiler error output was 
________Preparing application icon
________Creating animation xml
________Determining permissions
________Generating manifest file
________Attaching native libraries
________Copying native libraries
________Attaching component assets
________Compiling source files
(compiling appinventor/ai_alexdag6/Quiz_copy/Coaches.yail to appinventor.ai_alexdag6.Quiz_copy.Coaches)
(compiling appinventor/ai_alexdag6/Quiz_copy/CoachesScore.yail to appinventor.ai_alexdag6.Quiz_copy.CoachesScore)
(compiling appinventor/ai_alexdag6/Quiz_copy/Info.yail to appinventor.ai_alexdag6.Quiz_copy.Info)
(compiling appinventor/ai_alexdag6/Quiz_copy/Players.yail to appinventor.ai_alexdag6.Quiz_copy.Players)
(compiling appinventor/ai_alexdag6/Quiz_copy/Screen1.yail to appinventor.ai_alexdag6.Quiz_copy.Screen1)
(compiling appinventor/ai_alexdag6/Quiz_copy/Screen2.yail to appinventor.ai_alexdag6.Quiz_copy.Screen2)
(compiling appinventor/ai_alexdag6/Quiz_copy/Screen3.yail to appinventor.ai_alexdag6.Quiz_copy.Screen3)
(compiling appinventor/ai_alexdag6/Quiz_copy/Screen4.yail to appinventor.ai_alexdag6.Ntagk.Screen4)
(compiling appinventor/ai_alexdag6/Quiz_copy/StadiumScore.yail to appinventor.ai_alexdag6.Quiz_copy.StadiumScore)
(compiling /tmp/runtime3643133583467128246.scm to com.google.youngandroid.runtime)
Kawa compile time: 9.972 seconds
Does anyone knows how to pass this error?
OR do you know maybe an another better program which you can biult better apps? 
Thanks for your time and sorry for my english..

SteveJG

unread,
Mar 14, 2015, 9:28:52 AM3/14/15
to mitappinv...@googlegroups.com
How large is your aia source file?  The aia file can not be larger than 5Mb.   If it is larger, the app will NOT compile. (the app itself, once compiled can be much larger).  There are workaround solutions.
A 'better' program?    Do you know Java?   If you do, you can build more sophisticated apps with the free Eclipse or Android Studio compilers.  They are not as limited as AI2, however they are more difficult to use.

Here is a list of the usual suspects that could elicit the error you generated ... perhaps something is familiar?:

1)  You have coding errors in your blocks.  In the Blocks editor, look in the lower 
left corner of the window for the yellow and red triangle icons. If the red icon has a value larger than 0, 
you have a serious coding error.  Find the block in your code that has a red triangle and 
fix it.   Red triangles always inhibit creating an apk or running a project in the 
emulator or possibly creating an aia file.     Yellow triangles are more forgiving, 
however, sometimes, these need to be fixed because they trip an internal warning and not filling puzzle piece sockets that are left un-

filled can sometimes cause issues if the app needs a value that is not filled.

2) Your source file (the aia file) is larger than the 5Mb limit allowed in AI2 (the aia can not be larger than 5Mb). You may have put 

images or other resources in your Media (resources) that you do not use in the app. 
 All the images and sounds in resources count toward the 5Mb limit along with the source code.    You can program 
apps larger than 5Mb in the browser, but the apps will not compile and might not run in the 
emulator or the project may not save as an aia. If this is the case you need to reduce 
the size of your image and/or sound files.   Most image files can be made quite small 
by resizing them using a photo manipulation program on your PC to less than 50Kb each.

3)  You might have more than 10 Screens in your app.  AI2 becomes unstable when more 
than ten screens are used.  Projects CAN be built with slightly more screen but then you should expect your app to occasionally behave 

erratically.

4) You might have set a Screen icon in the Designer Properties for your project that is too large. Use an image 
sizeof 48x48 px  instead and only use jpg or png images.  *.ico files are not 
supported.  The 'icon' (actually an image) Google Play requires when posting needs to be 520x520 for their display.  The smaller 'icons' 

work for the app's icon (the one shown on the device's screen that is pressed to activate the app.

5) You did not code the entire project using App Inventor 2.   If you used one of the 
third-party AI2 clones,you might not be able to load a Project into the AI2 compiler or 
create an apk with the standard AI2.

6) If you incorrectly modified the project's Manifest files using a third-party tool, you may have issues.

7)  Sometimes, if you have LOTS of Layouts on a single screen,  the apk might not 
compile. How many is a lot?  I do not know, keep adding layouts and buttons, compile and try again...when the server crashes, you got a 

lot.

8)  The network you use may be overloaded (possibly a school network), or you have other applications running in the background on your 

computer, or your virus checker is doing a scan.  Sometimes, just trying to access the MIT server a few minutes later will give you a 

more favorable response.

9) Do you have BlueStacks on your home PC (BlueStacks is a special emulator that allows Android apps to run on a PC)?  The Google 

emulator on AI2 cannot run unless BlueStacks is disabled and all of the BlueStacks processes are shut down.  On a Windows PC, you use 

the Task Manager to 'kill' running processes.

10)  Are you using Sensor controls (except for the clock)?   Most Sensor controls or controls related to sms or the phone do not work in 

the emulators.  This includes the LocationSensor and Accellerometer.  These components need to be tested on a device.

11) If this is an issue about the Project loading slowly on your device or on the emulator:  Be aware, the more images, layouts, 

components you have on a screen, the longer it takes for the emulator and Companion to render the graphical screen.  How fast the 

emulator renders is partially a function of your hardware...how much ram you have, your cpu clock speed etc. Sometimes, with lots of 

graphics, the emulator will just give up.   Can you develop live using WIFI or using USB? These options almost always render faster than 

the emulator but will not be at lightning speed if you have lots of graphics.  Be patient.

12)  This happens too:   We have seen instances where it is probable the Google Cloud messed up; other instances where an older PC has 

had memory issues and caused file corruption of the Project and instances where a user is using a very slow Internet connection (like 

dial-up) and it is just too slow.

13)  Do you have an AVG, Eset or AVAST virus checker.  Some versions of these products have been reported inhibit running the emulator 

unless (in the case of AVG) the Advanced Link settings on the software are set to allow AI2 communication.


Is this the case?    How large is your aia?

Regards,
Steve

Alex Dag

unread,
Mar 14, 2015, 9:53:27 AM3/14/15
to mitappinv...@googlegroups.com
Well my aia is 1.44kb.
I have 8 screens.
Im working the original, not the clones.
Yesterday, i had download the apk file and it was working fine.
Can i send u my app, to see where is the problem.(if you have time for that.)
If you cannot, there is no problem!:)
Thanks for your post.

SteveJG

unread,
Mar 14, 2015, 10:28:09 AM3/14/15
to mitappinv...@googlegroups.com
Thanks for the additional information Alex.   You were able to compile the apk yesterday; the solution is simple, just install the aia file you last made.  You changed something in your code either just before you last saved the working project and now.   What is different?   You probably added a screen, an image or changed some blocks.

I would do this.   Make a copy of your Project.... Alex'sCopy .... then, with Alex'sCopy, start experimenting.    You can check for the red code error block indicator on your blocks screen, if the value next to the red triangle is > 0, you have a coding issue.     If that is not the issue... delete one of Screens, not try to run the app.   Doing so, screen by screen can help you safely isolate the problem provided you do so on the COPY.

No time this morning to look at an aia Alex...sorry.... perhaps someone else will be available.  In the mean time, you could experiment or use your last aia to recover probably.

Regards,
Steve

Alex Dag

unread,
Mar 14, 2015, 11:17:37 AM3/14/15
to mitappinv...@googlegroups.com
I have find a lot of problems, and i solve them although there are still some more
Just something more, what does actually mean undefined(when a press a button and goes to another screen writes this,but the screen open) and what can i do? I know what this word means in my language but still cant figure what does veritable goes wrong.
Thanks Steve for your time and your advise, i wish you the best.Sorry for my english:)

Taifun

unread,
Mar 14, 2015, 11:23:40 AM3/14/15
to mitappinv...@googlegroups.com
this might help
and: fix your errors

your app will not build, if there are red warnings in one of the screens
Taifun

Taifun

unread,
Mar 14, 2015, 11:24:43 AM3/14/15
to mitappinv...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages