Emulator Companion App Stuck at White Screen

859 views
Skip to first unread message

Tim McAvoy

unread,
Sep 9, 2014, 7:55:43 PM9/9/14
to mitappinv...@googlegroups.com

I have an app that I am developing for school and it runs on an Android device and Windows, but gets stuck on a "white screen" when I launch it on my Mac.

I have done a Hard Reset and reinstalled the Emulator.

Any suggestions?

Please see the issue in the screenshot below:


Screenshot 2014-09-09 18.54.24.png

Tim McAvoy

unread,
Sep 9, 2014, 8:05:23 PM9/9/14
to mitappinv...@googlegroups.com
I have also received this:


SteveJG

unread,
Sep 9, 2014, 8:26:46 PM9/9/14
to mitappinv...@googlegroups.com
Your second screen shot is one very commonly seen when using the emulator.  If you have made lots of edits, changed blocks or buttons while developing, the memory assigned to the VM used by the emulator gets overwhelmed and decides it is tired and you and lots of us get the same message.   To have this happen occasionally is normal when working with the emulator.  This type of emulator crash most often happens when you have finished making significant changes to the Designer screen by adding button, images etc.

Is this happening continually?

Regarding the white screen on when running the emulator on your Mac, does this happen for all Projects or just the one you are currently working on that works on on the emulator on a Windows PC?  And does it happen when 
you load the project or when you attempt to run it on the emulator?     Doing "I have done a Hard Reset and reinstalled the Emulator" was a smart first try at fixing the issue.   Sorry it did not work. Can you run your app in development mode from yur Mac using WIFI or USB?


The issue could be related to the code you are running.  I assume you are accessing it from both the PC and the Mac using the same Google log in?    If you have separate log-in's to the same project it can cause issues.

Here are some things that prevent apps from compiling, however these issues sometimes result in emulator issues.   Do any of them apply to your project?
ne of the following applies to your code:

1)  You have coding errors in your blocks.  In the Blocks editor, look in the lower left 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.     Yellow triangles are more forgiving, however, sometimes, these need to be fixed because they trip an internal warning and you do not get a compile, so fix the yellow triangles too.

2) Your source file (the aia file) is larger than the 5Mb limit allowed in AI2.    You can program apps larger than 5Mb in the browser, but they will not compile - sometimes they might not run in the emulator.  In this 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.  Apps with more than ten screens sometimes run and compile; however, AI2 becomes unstable over 10 screens and frequently, in that case, inhibits AI2's ability to create an apk or run in the emulator.


Regards,
Steve

Tim McAvoy

unread,
Sep 9, 2014, 8:43:49 PM9/9/14
to
It is a very, very simple app. 
It has the following in Design:
  • 3 - Labels
  • 2 - Sounds
  • 1 - Button (with image)
Blocks:
  • Button Click - plays sound and vibrates phone.
  • Accelerometer Sensor - shake causes a sound to be played.
It is the first project of the course and is a very elementary app.

It runs fine on Windows, but has issues on my Mac.
It happens when I run the emulator.
Just started today.
No errors or warnings.
The .apk is 4.9mb (image is 620kb).

Sadly I do not have access to an Android device currently to run on Wi-Fi or USB.
I also do not have many projects to run due to this being my first time with the AI2.

Thanks for the help.

Edit:  Sorry, the apk you posted was removed.  Forum posting guidelines prohibit posting of apk files.    Images of blocks of the app and even an aia is permited but apk's are not allowed.  No harm done.

SteveJG

unread,
Sep 9, 2014, 9:29:19 PM9/9/14
to mitappinv...@googlegroups.com
AI2 apps with the sensor controls may have severe problems when executed in development on the emulator.  The stock emulator does not have any way to deal with any of the Sensor controls except the Clock I believe.   As a consequence, if you call the accelerator sensor or attempt to vibrate  within the emulator, you probably will get a failure.   Those controls run only on a device.

OK about your projects.  Do you have a simple one you can try to run instead of this one.  Knowing it runs or does not run on your mac laptop makes a difference in any additional advice.
Thanks for the info about your problem app.  It just started today ... perhaps after you added some new controls?  If you did some modifications, that could be the reason it is not running now on your Mac .. is it still running on Windows?



Regards,
Steve
Reply all
Reply to author
Forward
0 new messages