I get the following error when compiling. I have over 1000 blocks on this screen, is that why? Any workaround?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_flyoffacliff/ifit4/Screen1.yail to appinventor.ai_flyoffacliff.ifit4.Screen1)(compiling appinventor/ai_flyoffacliff/ifit4/About.yail to appinventor.ai_flyoffacliff.ifit4.About)(compiling appinventor/ai_flyoffacliff/ifit4/Manual_Control.yail to appinventor.ai_flyoffacliff.ifit4.Manual_Control)
ERROR: appinventor/ai_flyoffacliff/ifit4/Manual_Control.yail line 13: call to 'set-and-coerce-property!' has too few arguments (3; must be 4)
ERROR: appinventor/ai_flyoffacliff/ifit4/Manual_Control.yail line 13: call to 'set-and-coerce-property!' has too few arguments (3; must be 4)
~~~~~~~~
ERROR: appinventor/ai_flyoffacliff/ifit4/Manual_Control.yail line 13: call to 'set-and-coerce-property!' has too few arguments (3; must be 4)
ERROR: appinventor/ai_flyoffacliff/ifit4/Manual_Control.yail line 13: call to 'set-and-coerce-property!' has too few arguments (3; must be 4)
ERROR: appinventor/ai_flyoffacliff/ifit4/Manual_Control.yail line 13: call to 'set-and-coerce-property!' has too few arguments (3; must be 4)
Kawa compile time: 2.463 seconds
Perhaps?
One of the following possibly applies to your code (all may not apply to your code):
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 billing puzzle piece sockets are left un-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 souce 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 occassionally 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 or 96x96px instead and only use jpg or png images. *.ico files are not
supported. The 'icon' (actually an image) can be as large as 520x520 (I think that is the size GooglePlay apps require). The smaller 'icons' work fine otherwise.
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 are using 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) If 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. They 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. 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 see 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.
Whatever the problem, it's in your manual_control screen. Something there requires 4 parameters, and you're only supplying 3...
Thank you for all the tips. I think I figured it out. Is there anyway to get around the 5MB limit? I really need 8MB. Is there a third party clone that supports larger? 5MB is tiny, Google Play allows up to 50MB.
Read my tips below on the 5MB limit:
Thank you. App Inventer might be okay for smaller projects, but I think I am going to need something more powerful for this. I need 200 sound files and over 1000 blocks. AI2 is bogging down my $2000 PC. I know the basics of Python but not Java, which is what Android uses. Can I export what I have done in AI2 into android source code and try to work on it in Eclipse? Any other ideas?
How many MB do these sound files have altogether?
You can always use a personal server and build your project on your own build server...
1000 blocks is not very much, but probably you have a lot of redundancy in your blocks?
how many Player components do you use?
see also Enis' tips.
A screenshot of some blocks could help us to help you...
Realistically, an Android phone is NOT a computer; an Android Tablet is NOT a computer. Depending on the device you use, the cpu's on different devices have different clock speeds, the internal system memory has limitations. If you get your app to run at lightning speed on a high end device, it will become a slow poke on an inexpensive device.
Apps coded in Eclipse, Android Studio, and various other languages will all have advantages over most AI2 apps in the speed department; especially if the app is doing mathematical operations.
Bogging down your computer? If you are running the emulator, slow execution is to be expected. Have you compiled your app and run it on a device. Generally the performance will improve dramatically. Is your issue slow compile speed? Android Studio is not particularly fast. With AI2 you can write code faster than most Java programmers, it is true and code compilation is generally fast.
You said "I can't even copy a 1.7MB .aia file." ..., that probably means you are doing something wrong? Have you tried non-live coding? You do NOT have to code live to a device or an emulator Ben.