After the recent update to App Inventor (ai2.appinventor.mit.eud) I am unable to load my apps in the emulator.
I have issued a Hard reset for the emulator
Then Connect -> Emulator.
Message box appears saying emulator has started.
Emulator reports “Waiting to get blocks”
AI then reports “Your Companion App is out of data. Click “OK”
to start the update.
I click OK
Message box reports that it is downloading the update. This closes almost instantly being replaced by an error message
“Software Update” saying “unable to load updates from App Inventor server” with a single button “Got It”.
I click “Got it”, the update process them quits with no further information supplied.
The emulator is left behind, reporting “MIT App Inventor 2 –
Running in the emulating, waiting to get blocks…” Version 2.11ai2.
How do I update the emulator to allow me to run
the apps in the emulator? I really need to get this fixed now. I have a class of students who are completing examination work and cannot proceed until this problem is resolved.
Any help greatly appreciated
Thanks
RIG
adb -e install -r MITAI2Companion.apkThe new Installer works in silent mode. Here are the flags to use:
At the command prompt type the following.
/S - for silent mode (default will be all users) and will need admin permissions.
/user=all or /user=current (again you will need admin permissions for all users)
/update - update installation.
/skiplicense - skip license
>MIT_App_Inventor_Tools_2.3.0_win_setup [/S] [/user=all or /user=current]
or
>sudo MIT_App_Inventor_Tools_2.3.0_win_setup [/S] [/user=all or /user=current]
if you need admin permissions.
The emulator is the standard Google Android emulator. The emulator literally emulates an Android phone. Just as phones have memory where the operating system and applications are stored, so does the emulator. In the case of the emulator the storage lives in a file. This file is copied and maintained for each user. You find this User specific file in:
[Windows7] /Users/<username>/.appinventor/emulator/Appinventor-emulator-data
The first time a User accesses the emulator the file does not exist. The file is copied from:
/Program Files/AppInventor/commands-for-Appinventor/extras/Appinventor-emulator-data
The "template" copy is created when you install the emulator setup tools. The setup tools contains an *old* Companion and Companion must also be updated. The first time a user uses the Emulator for App Inventor not only is the Appinventor-emulator-data copied, but the user is then prompted to upgrade the Companion in the emulator. The updated Companion is then stored in the copy of Appinventor-emulator-data in the User’s directory.
Some school networks us an application called Deep Freeze to limit access to their PCs. If you use Deep Freeze, it probably removes the User's personalized copy of Appinventor-emulator-data. This results in a fresh copy being brought in the next time the User logs in (say on the next day). This means each User has to updateupdadte the Companion again.
Administrators can get around this. Using some account, login, use the emulator, go through the Companion update process and THEN COPY Appinventor-emulator-data FROM THE USER'S DIRECTORY back to the version in /Program Files. Make the copy before Deep Freeze makes its "official" frozen copy. In this fashion when a student logs in and a fresh copy of Appinventor-emulator-data is copied from "Program Files" to their directory, they student/User will get the copy that contains the up-to-date Companion.
To get this to work you may need to follow the above directions with one small adjustment. If you run a Deep Freeze type program, the program erases any changes to the computers when they restart and updating can be a tricky. One school found through extensive testing that the Appinventor-emulator-data has to be copied (after updating) from the user profile back to the .appinventor/emulator folder in the root of the C: drive, not the Program Files folder.
You have to update User profiles each time we release a new Companion. New releases tend to happen only every few weeks (or sometimes after a month or so).