This is my first time running Eclipse on a mac. For some reason, when I launch an app in the emulator, while the console tells me that it successfully started the app, I can't see an emulator window anywhere. I know its running bc when I tried again, console told me "Activity not started, its current task has been brought to the front."
How do I find the emulator?!
Did you try cycling through open applications with command-tab or clicking on the application icon in the dock? Running applications will have a bright dot under them.
Ok, I'm using MotoDev Studio. Apparently I had to click the little cell phone icon in the bottom right to bring up the emulator.
Thanks all!
Related
Running Your App -> Run on the Emulator clearly explains how to RUN an app from within Android Studio by launching the emulator.
My question is -
Once I've done that: "How should I STOP the emulated app from running?"
Thought #1 - Use the "Run -> Stop (Ctrl + F2)" option on Android Studio's menu. But, when running my simple Hello-World-type application, that option is disabled.
Accordingly, Ctrl+F2 has no effect.
Thought #2 - Close the emulator window, by right-clicking the emulator's icon in my task bar, and selecting "Close window."
That closed the application all right, but then it seemed to leave things in a strange state.
-- When I tried to run the application again, it gave an error and I had to recreate the project.
That happened repeatably.
Thought #3 - Try shutting down the (emulated) Android device.
I tried that on Saturday evening: I held down the (emulated) Power button. Clicked the option in the "Device options" window.
It's now Monday morning, and it still says that it's "Shutting down...".
So, "How should I stop the emulated app from running?"
Thank you for any suggestions/help you can provide.
Russell
I now see that I had asked the wrong question.
I should have asked how to stop a running emulator.
Although I had been able to do so by right-clicking the emulator's entry in the task bar, and selecting "Close window", that had SEEMED to cause some problems.
["The selected device is incompatible" was displayed in the "Device Chooser" dialog.]
So, I thought that was the wrong way to do it.
Since then, though, I think I've figured out that something else was causing my problems:
I had an Android emulator process (emulator-arm.ese *32) which
hadn't terminated properly.
When I selected another device, I hadn't
given the (slow) Android emulator enough time to clear the "The
selected device is incompatible" error(s).
The problem process stayed in Windows' Task Manager after I shut down Android Studio, and Task Manager's failed to kill it.
So I rebooted my PC, and now everything seems to work OK.
Use the multitask button on the emulator itself to open the list of running apps, then click the "X" to close your app.
I'm getting started with Android development and with Genymotion. It's difficult to get Genymotion to install a .apk and run it more than once. Here's what I'm doing:
Begin with Genymotion running.
Press Genymotion icon in Elipse.
See Genymotion Virtual Devices Manager. Note that State of my VM is on
Create a new Android Project
Press the green Run button
See Run As dialog. Select Android Application
See Android Device Chooser. Select Genymotion_nexus_one
See hello world app run. Press GM home button
From here if I change the app, it's difficult to get the app to re-display in the emulator:
Drag a button to activity_main.xml. Save.
Press the green Run button
Nothing happens
To get the app to re-display requires jiggle the Handle type actions:
If I Clear the console log or bring up the GM Virtual Devices manager, before I press the Run button, the app will generally display in Genymotion.
Any ideas how to make Genymotion behave without Jiggling the handle?
I'm running the latest SDK: 20131030 on OSX 10.7.5
Drag drop apk on Genemotion emulator ,it will automatically installs and creates a shortcut.enjoy.
run in command-prompt :
adb install your_app_name.apk
:-)
Solved:
Since installing the adt-bundle-mac-x86_64-20131030, I'd never right-clicked the Run button to display the drop-down menu there. Having done that once, pressing the Run button now brings up Android Device Chooser every time (as it should).
When I first ran into this problem, I reinstalled adt-bundle-mac-x86_64-20131030 and Genymotion. I saw no change in behavior. This appears to be a minor bug in this version of adt-bundle-mac-x86_64-20131030
In Android Studio, if you run your project (shift+F10) when Genymotion virtual device is running; you'll see the device in connected devices list in Select Deployment Target window.
I'm a newbie that needs some help on getting the AVD running with my app. I've been developing C code for decades, but I have to admit the Eclipse/AVD setup has me stumped! I'm following the 'HelloWorld' tutorials on the developer.android website (and some others) and everything seems to be working OK, up to the point where I try to run it on the AVD simulator. I'm not getting any warnings, the Eclipse build/run output window says that everything is installed OK and the AVD does startup and run. Eclipse says that my app is loading, but it never runs. All I get is the simulator window with "ANDROID" on the screen and the buttons on the right-hand side.
I've got Eclipse Indigo and r18 of the Android PlugIn (I tried to install Helios, but the Eclipse website directed me to Indigo!). Is Indigo OK for running the simulator, or do I specifically need Helios? I also have Java 1.7.
The API level I have installed is Level 15 (v4.xxx of Android, I think). Don't know if I need a lower version to get my tutorial app to run, but level 15 is the only one I can select when setting up a device in the AVD manager.
I've been trying to get this going for days, trying all sorts of switches and buttons, but to no avail. Before I start uninstalling everything and reinstalling, can anyone advise if there is anything I might be missing, or has tripped over this problem themselves and found a way around it? Something that always trips up new starters maybe? Or do I need to go back to scratch?
Any help would be much appreciated.
How long are you leaving your emulator running after you attempt to launch your application? The Android OS can take a long time to boot up in the emulator. If it's stuck on the "ANDROID" screen then you're either not waiting long enough or there's something wrong with your emulator. It should eventually boot into the normal Android lock screen or home screen just like a device.
You can launch your emulator ahead of attempting to run your app by opening the Android Virtual Device Manager (toolbar icon in Eclipse, if installed properly) and then selecting an emulator and clicking the "Start" button. If you don't have any emulators listed, then you need to create one by clicking the "New..." button.
I followed the tutorial to the letter. I select run then the emulator starts up. Problem is that I never get to a home screen, nor does the text hello world display.
Is there a way to test my installation of the emulator?
Take into account that the android emulator takes some time to load.
Wait for a few minutes and check logs on the DDMS to see if everything is loading correctly.
It does take a while to start up. But remember that you don't need to close and run the emulator every time you want to test your project. Just leave it open and it'll just launch your application when you want to run it.
I had the same problem and discovered (by clicking all the buttons in the emulator) that if you press the home button (little house) then the launcher icon (grid of squares) that the app I was launching had been successfully installed and I could run it by clicking on it. I still don't know why running it from Eclipse wasn't getting all the way into the app, but at least it was installed and I could run it from the emulator.
Press and hold the power button in the emulator.
If you have the time and patience, check out this site:
http://bid.berkeley.edu/cs160-fall10/index.php/Tips_and_Tricks
It provides a great walkthrough on installation and setting up Android development. See if you miss any steps?
so I just recently (yesterday) started developing on the Android platform. So far I have created a Hello World application as described in their tutorial, but it does not run. When I run it, it waits at the blinky Android screen, then finally moves to the screen where it says Android in a fancy font and its kind of glossy and silver but never moves from there. What have I done wrong? Thank you.
That just sounds like the Android emulator isn't starting properly.
If you run adb logcat from the command line, or open "LogCat" view in Eclipse, do you see any messages appearing? You may have to select the "emulator-5554" device first from the "Devices" tab first.
Try exiting the emulator and eclipse both, and then restarting eclipse and running the project once again. This worked for me.