2014년 12월 5일 금요일

run-emulator


https://code.google.com/p/app-inventor-for-android/issues/detail?id=2579 using the following batch file,I was able to open the emulator, but was unable to connect with app inventor. it loops down saying that is connecting to app inventor. I have also posted the link from which i have downloaded the file.

--

Why are you running a batch file to open the emulator?    On a normal AI2 install, you do not have to run a batch file.


The instructions for running and installing the standard AI2 Google emulator are here: http://appinventor.mit.edu/explore/ai2/setup-emulator.html  
and specifically for Windows  http://appinventor.mit.edu/explore/ai2/windows.html  

The emulator should install with no issues on your Windows 8 PC.

--
As stated in the comments of the issue you point to, the scripts will look for a particular hardcoded path, which is what the majority of our users will have. If you have a custom windows install, things might not work. You can have a look at the scripts and see if you can figure out what's going on; they are at: https://github.com/mit-cml/appinventor-sources/tree/master/appinventor/misc/emulator-support

--
Firstly:  While downloading the appinventor setup, the command to run the emulator is a batch file.
Secondly:While clicking the connect menu in the editor,the emulator opens, but it doesn't connect to app inventor.
Please Reconsider.

--
Does the emulator screen show 5554 in the upper left screen?   That is the emulator that comes with App Inventor.   If you have perhaps 5556, you have a different version of the emulator perhaps installed with  a different program.  AI2 currently is looking to connect to 5554.   Perhaps that is part of the issue.

--

I have emulator 5554

--
I am not certain you attempted to set up the emulator correctly.  The correct emulator is appearing on your system.

The setup for a Windows PC is here:   http://appinventor.mit.edu/explore/ai2/setup-emulator.html   

In step 1, those instructions direct you here   http://appinventor.mit.edu/explore/ai2/windows.html  

Did you use the file  AppInventor_Setup_Installer_v_2_2.exe   ?

I suggest you uninstall the software, then reinstall to the default directory on your PC.   On a Windows 7 PC the files are here:

and should probably be in the same place on a Windows 8 PC.  Use the uninstall.exe , then immediately close your browser and reboot the PC before reinstalling.

--
Nothing Happens.

--
I re-installed the software. But I have the same error.

--
Can you tell me exactly where your files are being installed to, what is the install directory for your files?

--
We are experiencing some problems with running the emulator.  For some students it is working fine and when you launch the emulator they can see their app.  Other students start working but then when they try and run the emulator again are getting errors like "Launch the ai starter on your programme on your computer and try again".  They have previously launched it and used it successfully so I don't think it is an installation problem. All students are using the same network, same firewall and were installed the same way.  They have reset connection, closed and reopened app inventor and aistarter and some have rebooted their computers.  This is really frustrating and not giving a good impression of the software.  If it is installation surely everyone would have the same problem? I remember last year this being a little random but not this bad.  I REALLY don't want them using TouchDevelop but many of my students are wanting to review App Inventor.  HELP!

--
First I know how frustrating this must be for you, and would really like to get to the bottom of this issue. First could you check whether you are running the latest version of the setup tools. You can check by visiting the MIT App Inventor 2 Connection Test page here: 


It should give you a screen similar to this. Please let me know if the aiStarter is version 2.2

MIT App Inventor 2 Connection Test
Is aiStarter running?
YES, aiStarter v2.2 running!
Is your phone connected via USB?
NO, your phone is not connected via USB! Get USB Connection Help

--
The student that experienced problems with the emulator today ran this test and it showed that the starter was not running (even though it is on their desktop and in the startup menu)

--
Some emulator issues have been traced to poor coding using blocks, and on one occasion it appeared the PC a person was using was having hard drive and memory issues, causing emulator failure and ability to compile.  When these problems occur, does it always seem to be the SAME computer? You are using Win 8...that implies all the computers are relatively new?    Or are these older PCs with Win8 installed?

One instructor had similar issues to what you describe.  The problem was some students having sever coding issues.  When the block code is malformed or when one uses lots of layouts, this can cause problems.    Is this your issue?    Possible.  Only way to tell is to run a simple project on the offending computer.   Create a new Project.   Put a button on the Designer screen.  Now run the project in the emulator.  All you should see if it is running correctly is the emulator start, then the button render in the emulator screen.  Does the simple project work or fail.   If it works, look for a problem with the student's Project.   If it fails...well, something more serious..perhaps hardware issues.

Another instructor traced similar issues to the ability of the school network to handle 30 students simultaneously.  An upgrade of the Internet seemed to solve his issue.   Is this your issue?   No clue.

Here is my standard "What could be wrong?"   These things may not apply in your case, but some of these issue do cause issues running the emulator (even though they might mention compiling apk's and creating aia's, they still might be responsible for emulator issues).  Good luck.

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. Sometimes, with lots of graphics, the emulator will just give up.   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.

The problem could be something else, like running an old version of Companion ...in this instance the cure might be:   Projects > Hard Reset.  If there are Companion issues a pop up will appear (if no issues, nothing will happen...just smile).  When the pop up appears, follow the instructions very carefully, then reboot your PC and try again.

--

댓글 없음:

댓글 쓰기