简体   繁体   中英

MIT App Inventor 2: emulator doesn't launch companion

When I run aiStarter.exe as administrator, and the click on connect to the emulator in http://ai2.appinventor.mit.edu , then the emulator starts, the black screen with android is displayed and after a couple of seconds I get the android home screen.

Then every couple of seconds, a line "127.0.0.1 - date/hour/ "GET/echeck/..." is added in aiStarter.exe , and on http://ai2.appinventor.mit.edu the message asking me to wait a minute or two while it's starting emulator remains. I have waited for something to happen at this point for 30 minutes, but nothing changes.
在此输入图像描述

If I understood it well, the companion should be automatically launched and then I should be asked if I when to update it. But this never happens, it is as if emulator get stuck just before companion get launched, or App Inventor never recognizes that emulator has started.

There is a simple fix to that bug:

once your emulator is loaded (just wait until you see that: pct1), don't close anything, just open Windows Task Manager ( Ctrl + Shift + Esc or Ctrl + Shift + Del -> Task Manager ) in the process kill the adb.exe ( while the emulator is working ) cf. pct2. Don't do anything else, wait for few second and you will see a new popup to this site saying that it has detected the emulator. Repeat that each time the emulator stuck.

pct1:

在此输入图像描述

pct2:

在此输入图像描述

This seems to force adb to listen on the port 8001

EDIT1 an other way to kill and restart adb.exe:

List item:

  1. put your UAC (in start menu) at the lower level
  2. launch your emulator, when it's ready (SD card prepared) do the following
  3. go in C:\\Program Files (x86)\\AppInventor\\commands-for-appinventor right click new and "text" and rename this file run.bat (to change .txt in .bat)
  4. right click to edit the file with notepad
  5. write just: CMD
  6. save and close
  7. now double click that run.bat file
  8. write: adb kill-server
    (press enter and wait)
  9. write: start-server
    (your emulator should now connect)

Edit2: Genymotion works much faster with app inventor 2.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM