Hi, how do I run emulator on Ubuntu 21.10?

I relied on the emulator for years until I got an actual Android phone with camera.
If you can manage to download this .apk file onto your Android phone, you won't need any of

  • aistarter
  • any Android emulator.

http://ai2.appinventor.mit.edu/companions/MITAI2Companion.apk

Once you get that Companion app onto your phone, you can debug from your desktop web browser and phone.

I'm not threatening anyone and I'm not going to, I find it funny that the MIT community can't run a program on ubuntu.

1 Like

But technically you can run aiStarter on ubuntu! (with a compatibility layer)! :wink:

Please explain and detail your method for this.....

1 Like

We, after significant effort, successfully installed and ran the AI2Starter program on your computer yesterday. i do not understand why you would say this?
For some reason, the web connection is not working (for you)
We await further input from MIT devs on this.

3 Likes

Ok, so this method will work on every linux distro. :wink:

So you need to download this tool named 'WINE'

Download the package from terminal using winehq.org and follow this tutorial:

and run the aiStarter setup by configuring the emulator :wink:

Yeah. and I do not know this method works or not, because my linux machine fails to boot.

Worth a try I suppose, but given there is a native linux solution - that works for most people (and the fact that most people using linux do so to avoid using Windows.... :wink: )

1 Like

Yeah. and I do not know this method works or not, because my linux machine fails to boot. :slight_smile:

So far, no one working for MIT or studying at MIT has responded to this thread.

We are more MIT fans than MIT community.

Regarding Ubuntu, every few years I try it to see if I can avoid the Microsoft and Apple dumbth taxes.

In the end, I find that you get what you pay for.

3 Likes

The emulator package for Ubuntu is fairly old at this point, but it should still work. The major challenge when using it on newer versions of Linux is that most distributions are now primarily 64-bit, as the emulator and its supporting utilities are 32-bit. I set up a VM using Ubuntu 21.10 and determined that the following should work in a clean environment:

  1. In a terminal window, install necessary 32-bit libraries with sudo apt-get install libstdc++6:i386 lib32z1
  2. Download the deb file with wget -O aisetup.deb http://appinv.us/aisetup_linux_deb
  3. Install the package with sudo dpkg --install aisetup.deb
  4. Run aiStarter with /usr/google/appinventor/commands-for-Appinventor/aiStarter
  5. In your browser, open App Inventor (either http://ai2.appinventor.mit.edu or http://code.appinventor.mit.edu)
  6. Create or open a project
  7. Connect to the emulator with Connect > Emulator
  8. On the first run, the emulator's companion will be out of date. Follow the prompts to update the companion. This update process will close the companion connection in order to update the companion app.
  9. After the update process completes, use Connect > Emulator to reestablish the connection.

You mentioned compiling and installing APKs on a phone, which suggests you have an Android phone. If so, it's probably easier to use the recommended testing method and install the MIT AI2 Companion app from the Play Store and use that instead of working with the emulator, which bundles a fairly old version of Android. See this page for more details.

3 Likes

A post was split to a new topic: How do I calculate a date difference?

I tried this on my Xubuntu 20.04 LTS, using Chromium browser.

When selecting Emulator I get:

image

(this is as far as the OP got on 21.10 last night)

Ah, I restarted http://ai2.appinventor.mit.edu, and it worked :slight_smile:

1 Like

A recap on commands needed:

Open a Terminal

cd
sudo rm -rf /usr/google/appinventor
sudo rm -rf ~/.appinventor
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install lib32z1
sudo apt-get install lib32stdc++6 
wget -O aisetup.deb http://appinv.us/aisetup_linux_deb
sudo dpkg -i aisetup.deb
/usr/google/appinventor/commands-for-Appinventor/aiStarter
pan@pan-H61M-D2-B3:~$ /usr/google/appinventor/commands-for-Appinventor/aiStarter
Bottle server starting up (using WSGIRefServer())...
Listening on http://127.0.0.1:8004/
Hit Ctrl-C to quit.

app inventor --- connect --- error the same like earlier.

The aiStarter helper does not appear to be running
Need Help?

Interesting. What happens if you navigate to http://localhost:8004/ping/ in the same browser in which you access App Inventor?

I have this:

{ "status" : "OK", "version" : "2.3" }

Ok, so it looks like aiStarter is running somewhere. Did you leave a copy running in the background at some point? You can try running killall aiStarter and then re-running /usr/google/appinventor/commands-for-Appinventor/aiStarter to ensure you only have a single process. Normally you will see a log stream in the terminal window containing aiStarter, which will help with debugging any issues going forward.

i forgot:

in terminal after typing in browser i have this:

127.0.0.1 - - [15/Feb/2022 15:07:11] "GET /ping/ HTTP/1.1" 200 38
127.0.0.1 - - [15/Feb/2022 15:07:11] "GET /favicon.ico HTTP/1.1" 404 742

I haven't seen it before - but probably because this window disappears after a while and I get a connection error, but I have:
"unable to retrieve the version of aiStarter ..."

That's what you should get (on Windows, that is) when aiStarter acquires a connection from the website.

That looks good. What does the output look like when you try to connect using the Emulator option in the menu?