Add application launch shortcut in Eclipse? - android

I've been programming Android in Eclipse for about a year now and I have always launched my app by right clicking on my project name in the project explorer, followed by "run as", then "Android Application". There has to be a better way...
Is there a way to change this (three mouse clicks):
"Right click on project" -> "run as" -> "Android Application"
To this (one hotkey press):
<My favorite hotkey>
So I can just press one button to launch my app?
Thanks!

Eclipse/Window > Preferences > Run/Debug > Launching
Select 'Always launch the previously launched application' in the 'Launch Operation' section.
Then just use your shortcut of choice. I think Ctrl + F11 is the default for this

In preferences, go to General -> keys and search for the Android Application command. You can set a new key combination from here.

On MacOSX, for me worked Cmd+Shift+F11, which came down on laptop keyboard to Cmd+fn+Shift+F11

I am not sure why the last answer is voted down, as I think it is the best answer. In the standard ADT Eclipse tool bar, there is the following button:
If you are editing a Java file, and press this button, your app will automatically be launched. Thus, this is one the one button press to launch your app.
As with the other shortcuts mentioned here, this does not work if you are editing an XML file (so ensure your editor is showing a Java file).

1) Eclipse/Window > Preferences > Run/Debug > Launching
2) Select 'Always launch the previously launched application' in the 'Launch Operation' section.
3) Then just use your shortcut of choice. I think Ctrl + F11 is the default for this
Someone suggested the above and it worked for me!

If you want to run your app when a XML file is open in your eclipse you must set your run configuration
Eclipse -> run -> run configuration -> Android Application in left window -> your configuration -> android tab in right window -> launch -> select your main activity

For this you can use (ctrl+F11) , which shows all online devices which is used as emulator

Eclipse toolbar has green run button which has default meaning run last selected configuration. Just click there.

Related

Why Device Manager don't open?

I'm working on the Flutter project. After I updated the version of the Android Studio when I click on the device manager to open my devices it doesn't show. I don't know what should I do?
At the first image it's gif image to explain what I mean.
I put the second image to show current version (Bumblebee).
IntelliJ (Android Studio) wants to know what kind of project you have to show the right menus.
click left in file tree on the root node (project name)
MENU -> FILE -> PROJECT STRUCTURE
select left MODULES
hit + button to add ANDROID
hit OK Button
top of the root node (project name) select PROJECT... to see your old view
press shift 2 times to open search everything and type "Virtual Device Manager".
I also face this issue with new Update of Android studio. So i just got a solution..
Go to the Search icon on the top of Right Corner or Press Shift Button twice to open a Search window.
And Search Virtual Device Manager then you will eaisly got your Device Manager.
Android studio no android module
Please check whether your flutter project is creating Android module by clicking left side of the android studio.
Also try another SDK location or try renaming it.
Do not delete the previous sdk since it seems it creates some issue while opening the device manager.
I think there is a problem related to the button that opens the device manager because it opens when you search with "Virtual Device Manager".

Confirm Exit Dialog When Closing Android Studio

When try to exit the Android Studio, it shows a confirmation dialogue box asking 'Do you really want to exit?'. I mistakenly check the 'Do not ask me again' check box when I tried to exit the android studio. Now, I want that confirmation dialogue box back. I checked it out under File -> Settings but I could not able to find any option to restore that feature back. And also googled it but all in vein.
For MAC users follow the following steps:
1)Select Preferences from the Android Studio menu
2)Scroll down till the IDE Settings and select the sub section General
3)In the Startup/Shutdown section, you will find Confirm application exit. Select it to enable it again
4)Press Apply
For Windows users follow the following steps:
1)Select File from the toolbar
2)Select Settings
3)Scroll down till the IDE Settings and select the sub section General
4)In the Startup/Shutdown section, you will find Confirm application exit. Select it to enable it again
5)Press Apply
Open File -> Settings
Enter exit in the search box on the top left
Click on System Settings
Check Confirm application exit
Click on Apply
1. Mac Shift+Cmd+A, Windows Ctrl+Alt+S
2. Type "Confirm application exit".
3. Switch ON / OFF in the same windows.
To enable confirmation exit
File -> settings -> General -> Tick confirm application exit
For updated answer/guide as of Android Studio 2.1.1
Go to File
Select Settings
Under Appearance & Behavior
Select System Settings
Click/Check Confirm application exit
Ctrl + Alt + S (for opening Settings shortcut) - Windows
Alternatively to the above answers, you can prefer the hackish way of altering IDE settings - by editing ide.general.xml settings file (on Windows it shall be C:\Users\<LOGIN>\.AndroidStudio\config\options folder) and altering <option name="confirmExit" value="false" /> to true :)

How to execute android application Application in same emulator rather than new emulator every time I run the application? [duplicate]

This question already has answers here:
when i start eclipse and run android project, it opens a new emulator every time ,
(3 answers)
Closed 8 years ago.
In eclipse When I run android application it always Launching a new emulator with Virtual Device 'xxx'.
But I want to run current running emulator.
How to make it possible ?
Right click on project->Run As->Run configuration->select Tab Target->select Radio button " always prompt to pick device" ....
so it will always give prompt to select emulator....
I hop it will work for u...
your application Target mode has set to manual. To solve :
Right Click on your project-> Run as -> Select Run Configurations -> In that select Target
Tab ->Select Automatic instead of manual
Click on Apply and run.
hope it help you.
All right in the project explorer Right click on your project and goto RunAs..->Run Configuration. Then goto the target tab. I think you might have some miss-configurations there. Just choose the option that best suits you. Hope it helps. Just let me know if you still can't solve it.
Follow this steps it will help you.
Try this,
Just Right click your Project name --> Run As--> Run Configurations --> Target Tab --> pick up Always prompt to pick device --> Apply / Run.
Select "Choose a running Android Device" while running
And close the adt application from your task manager
If that also doesn't work click reset your adt from eclipse devices

Intellij "Run as Android application" missing

The emulator android is really running slowy, and I found Genymotion and runs really fast! And when I tried to use with Intellij, after I followed every step from this doc https://cloud.genymotion.com/page/doc/, I got stuck in this item:
In your application project, right click and chose "Run as Android
application" The "Android Devices Chooser" opens Click on the
Genymotion virtual device you started/created
I really can't find "Run as Android application" whenever I click on my folder project, where I'm missing?
Look at this image, I really don't know why.
http://i42.tinypic.com/2ia76rl.png
In IntelliJ inside the Run/Debug Configuration dialog (available under Edit configurations...) you have to select radiobutton "Show chooser dialog" instead of Emulator.
Then you just press Run and you get the list of running devices.
If you select "Use same device for future launches" in the configuration dialog, you won't have to select the device again next time.
Check the toolbar of Intellij. There is a drop down menu (next to it are the "play" button and the "bug" button to start the debugger). You need to setup an Android configuration for your project first.
Check this site
http://www.jetbrains.com/idea/webhelp/creating-and-editing-run-debug-configurations.html.
Although I have a configuration for my project, like you I can't see it in the menu your screenshot is showing. But I can use the mentioned run button to run my project without any problem.
Good luck.
On your screenshot you have a "Run" item on the options. Look at what appears when you let your mouse over it ;-)

run not responding for android in eclipse

I am updating an Android project, and for some reason the run button in eclipse does nothing. I can get the app to run if I go Run>>Run Configurations... and then start it from that, but if I just click the play button or if I use the hotkey for run (CTRL + F11 ) then nothing happens. It seems to make no difference if an emulator is already going or not.
Anyone have suggestions? I like to code by making small changes and then running the app to see what happened and its very frustrating to have to go through 3 clicks just to get it to run every time.
Thanks
Using default settings in Eclipse, the Run button and hotkey CTRL + F11 will not work when the xml editor is in focus. It should work if you are working with the Java editor. To use the button or hotkey while editing xml, first click on the project in the package explorer.
You can adjust this by going in to Eclipse Preferences and choosing Run/Debug and make it launch your last used Run Configuration. Then only for the first time you launch you will be required to right click your project and choose Run As -> Android Application. After doing this pressing Ctrl+F11 or the Run icon will always start that Run Configuration.

Categories

Resources