Android Studio Emulator in a Separate Window - android

I'm having a problem with my Android Studio. This is the first time that I installed Android Studio. The problem is that when I install any device it comes up with a grey background around the device or the emulator, I don't know if it has any thing to do with the latest Android Studio version, cause I have updated it, and the toolbar is at the top of the emulator instead of being at the top right of the device.
The first picture is how I want it to be, and the second picture is what appears when I open Android Studio and run my app on the device (emulator).

In the second picture you have the emulator floated or windowed:
In order to get the emulator in a "separate" window go to Preferences -> Tools -> Emulator and uncheck Launch in a tool window:
Here is the documentation.

Here is how to open the Android Studion Emulator in a separate window.
Open Settings from File -> Settings...
Select Tools -> Emulator and uncheck Launch in a tool window

There is a better idea to open as it opens in an older version of Android Studio.
If you open any project then close it. Open Virtual Device Manager.
It will look like this image
If you run it before opening any project then you will get a separate window emulator as it looks earlier. It will behave like a separate application. If you close the Android studio also it will remain open. You can close it manually.

Related

Android Studio Emulator Doesn't Open Seperate Window and It Doesn't See Emulator

When I start the emulator in Android Studio, it opens as a tab. I want to open it in a seperate window.
Additionally, my Visual Studio Code doesn't see this emulator.
Also, Android Studio, (and VSCode as well) doesn't see the emulator too. It isn't listed in select device.
I didn't use to have these kind of errors. I needed to delete Android Studio. I reinstalled it and things changed.
To resolve the issue, go to: File > settings > tools > emulator.
After that, untick "launch in a tool window" option.
Note:
Restart the program if you couldn't launch the emulator if instead you get a message that it's already launched.
With the new update it's possible to open the emulator as a new window clicking on settings icon -> view mode, there you can choose what's the best for you, maybe it can help.

how to remove emulator from tool window android studio

for the new android version 4.1 or newer, we can run the emulator directly to the android studio tool window. it's good. so I add an emulator there, but I face some problems seeing this full screen of the emulator if I open logcat. so, now I want to remove the emulator from there. (i am unable to find out this setting, that where we remove this connection form directly show in android studio).
see this image,(it helps you to get my question proper)
again, in short, I want to remove the emulator tool window from my android studio. (i want to directly open this in the default way, where i will able to use emulator without showing inside of android studio)
go to File -> Setting -> tools -> Emulator and uncheck the checkbox (Launch in tool window) and apply changes. That's it. and restart your emulator
For Windows,
Step 1 :
File -> Setting -> Tools -> Emulator
Just uncheck the checkbox of "Launch in tool window" & click on Apply at right bottom & restart Emulator again.
For Mac OS,
Step 1 :
Android Studio -> Preference -> Tools -> Emulator
Just uncheck the checkbox of "Launch in tool window" & click on Apply at right bottom & restart Emulator again.
If still emulator is in Tool Window then first you need to stop running emulator in Tool Window.
For stop emulator,
Step 2
Open AVD Manager -> Choose down arrow of your selected emulator -> click on "Stop".
Just verify Step 1 before running your application again.
Now you have to run your application.
Step 1 : Android Studio -> Preference -> Tools -> Emulator Just uncheck the checkbox of "Launch in tool window" & click on Apply at right bottom & delete your emulator & create a new emulator
You only need to click on the x of your emulator window.
Emulator tool window
Go to Android Studio ->Preference->emulator->deselect Launch in a toolbar window
After applying change do invalidate and restart.
For those looking for a way to undock the emulator without changing the default setting (because I like it docked, most of the time)... right click on the emulators tab and see:

How to open AVD manager in Android Studio 3.0 version?

after I update Android Studio from 2.3 to 3.0 version. I can not find AVD Manager in Tools/Android/AVD Manager.
I just did a fresh install and had the same issue. Solved by:
Click "Install missing platforms(s)..." in the highlighted error:
Then after the download/install, click "Intall Build Tools...":
Then after the download/install, you will see Android under Tools menu
If you have never used Android Studio Before, and do not have a Project
..Opening the AVD Manager is even trickier!!
For example, if you are installing it to use an emulator for a create-react-native-app project., but aren't otherwise using Android Studio to write or manage your app.
Here is how you can gain access to the AVD Manager.
AVD Manager is required to set-up your emulators.
Android Studio Documentation does NOT tell you how to gain access to AVD Manager. It starts at Open the AVD Manager!
I Just Need the emulator (and manager).
But I did not even have the window the OP refers to.
Nothing in the Configure menu, not Preferences (even Preferences -> Tools) gave me access to AVD Manager.
So in my case it was even more confusing to have No Direct Access AVD Manager !
Nor did I have an android folder in my create-react-native-app app, so hamdi's answer above did not work for me.
All I had was a new folder/git repo from:
create-react-native-app
My Solution
On the Android Studio Startup Screen, I choose:
Import Android Code Sample
Then choose any sample. (I choose the first example listed).
Then (after a bunch of downloading/building..), then brought up the window the OP refers to.
I then had to update gradle, as mentioned by user1449542's post above.
At that point, Muhammad Hannan's answer above was helpful !!!
I clicked the icon from the bottom image in his post -- vioa!
( Alternatively from the menu bar choose: Tools -> AVD Manager )
Better Solution:
I have since realized that the Startup Screen Option:
Start a new Android Studio Project
also works and is even quicker (less to download/build), and might not even need gradle file updates (mentioned by another post) that I had to do when I downloaded a sample project.
Just use the default settings to create a dummy project in the default location, and choose
Add No Activity.
Android Studio will "build" this dummy project, and set it up, then open the Window you need to access said icon, and/or menu bar.
In the future, this dummy project will appear on the left of Android Studio's Startup Screen.
Just click on that dummy project to re-open the window you need to access AVD Manager.
Then, as before, click that icon (or from the menu bar choose: Tools -> AVD Manager) to create/edit AVD emulators.
If you're using React Native (create react native app), you can start an emulator from the command line, once you have created an AVD emulator, and probably won't need to open Android Studio itself. (see notes below).
Be sure to start the emulator before choosing a (from the terminal window that's running your app via yarn start).
Additional Notes for reference:
To start the emulator from the command line:
emulator -avd <avd_emulator_name>
To list what emulators have been configured:
emulator -list-avds
AVD_Nexus_6P_API_23
AVD_Pixel_2_XL_API_27
AVD_Pixel_XL_API_25
So, for example, I can do this:
emulator -avd AVD_Pixel_2_XL_API_27
Additional Information
I also had to add the following lines to my .bash_profile
export JAVA_HOME=`/usr/libexec/java_home -v 10`
Note: the value between the back-ticks is what the JAVA install from my terminal replied. If you type that part into terminal by itself, it spits out the location Java was installed. If you have an different version of Java installed, just replace 10 with your version.
I then got the following path from:
- Android Studio Startup Screen -> Configure -> SDK ManagerPreferences
- Appearance & Behavior -> System Settings -> Android SDK
- Android SDK Location: /Users/sherylhohman/Library/Android/sdk
and used it as the value for adding the following line
export ANDROID_HOME=/Users/sherylhohman/Library/Android/sdk
Though I chose to write it as the following instead:
export ANDROID_HOME=$HOME/Library/Android/sdk
Finally I added:
PATH=$PATH:$ANDROID_HOME/emulator
PATH=$PATH:$ANDROID_HOME/tools
PATH=$PATH:$ANDROID_HOME/platform-tools
PATH=$PATH:$ANDROID_HOME/tools/bin
PATH=$PATH:$ANDROID_HOME/platform-tools/adb
export PATH
I may not have needed the ...adb or 1 or more of the last PATH entries.
This was a cumulation of many internet searches, many conflicting solutions. The major missing key was accessing AVD Manager (OP's question), which finally solved the problem. This just happens to be the items I had already added to my .batch_profile along the way trying to get the android emulator working inside my create-react-native-app App!.
I found this just under the toolbar in Android Studio (v3.2):
Go to the "Event Log" tab in the bottom right corner.
There will probably be some error messages. It will provide information and links to resolve the problem. Then the buttons will not be greyed out anymore.
I'm using Android Studio 3.0 on Ubuntu I have AVD under Tools > Android > AVD . And also on the right upper corner of the screen.
EDIT :
Go to Settings and search for AVD.
If you encountered the problem when using React Native, you are probably trying to include the whole project in Android Studio. You only have to include the android folder from the React Native project. After this process, Gradle will be synchronized and AVD Manager will come back.
I had the same problem.
If you get this message: "Frameworks detected: Android framework is detected in the project" then click on it and add Android.
After that, the icons should be enabled now.
you can find SDK manager,AVD manager TOP right side on android studio version more than 3.2.0.
and if you want to run via commmand promat you can go to
cd Library/Android/sdk/tools/bin
./avdmanager list
I had the same issue in Windows 10 and saw this solution in another post ... It worked for me.
Set-up the System Environmental Variables ANDROID_HOME and ANDROID_SDK_ROOT
To do this ...
Click the windows key and start typing System.
Select it when it pops up in the menu.
Click advanced system settings
Select the advanced tab
Click Environmental Variables at the bottom
Under system variables, click new
Enter the variable name
For value, enter the the path to the Android SDK, which will most likely be: C:\Users[username]\AppData\Local\Android\Sdk
Use the same path for both variables
In Andriod Studio 3.5 its here
Following the event log to install resolves the issue
Hit ctrl+shift+a and search avd and click on it
I was not able to find AVD manager in android studio easily for Android studio version 3.1.2.In order to launch AVD manager, i had to create a sample project and then launch it from there.
I have documented all my steps here, in case any one wants to get benifitted.
How to launch AVD manager on Android Studio 3.1.2

android studio - emulator doesn't work and genymotion doesn't get recognized

I'm building an app in Android Studio (beta) 0.8.9, though I can't seem to get emulators running. I've made a Nexus 4 and 5 emulator through the options, but I can't seem to get them started. It shows this in the Run App tab.
Waiting for device.
"C:\Program Files (x86)\Android\android-studio\sdk\tools\emulator.exe" -avd smallEmulator -netspeed full -netdelay none
So either it's not starting up, or I'm just an impatient SOB.
I've also downloaded Genymotion and started up an emulator through that, but now Android Studio doesn't recognize the emulator anymore. I try to run my app and check for any running devices, but it doesn't show up, despite the fact that it actually is running.
I've added the Genymotion plug-in, to no avail. No idea what went wrong.
I also have a One Plus One, which I'm not sure how I can debug on that. They don't seem to have drivers for that and haven't immediatly found anything on Google so far.
Any help would be much appreciated.
EDIT: I fixed my problem. I used Genymotion to fix the problem. The running emulator wasn't turning up, because the android SDK's weren't linked to one another. Genymotion and Android Studio used different ones. So I edited Genymotion's settings to use the same one of AS and now it works!
First of all, update android studio. Check if the emulators run from the AVD manager outside Android Studio, I mean by starting it up manually from ur SDK installation folder (AVD Manager.exe) . Check the path of ur emulator in .ini file in C:>Users>user-name >.android>avd. U can make a system variable for ur SDK folder "ANDROID_SDK_HOME" and place the .android folder's content there (the whole .android folder). Sometimes "resetting the adb" after u run emulator may work.
There may be an easier fix than what was previously mentioned. Try opening Android Studio, go to File, Settings, plugins. Select the “Browse Repositories” button at the bottom of the page. Scroll down the displayed page to find “Genymotion”; select it and install it.
When it has installed, restart Android Studio. Again, go to File, Settings, then go to Other Settings. Genymotion should show up as an option. There will be a field that asks for the path to the Genymotion folder.
Mine was: C:\Program Files\Genymobile\Genymotion. At any rate, enter the path, click Apply or OK and Android Studio should recognize Genymotion (You may need to restart AS once again). Now you should have a small red icon on Android Studios tool bar; when you hover over it a pop up that identifies it as “Genymotion Device Manager”. Click on it, select a device to load, click start and allow the virtual device to start completely. Now run your Android Studio project; the Android Studio “Device Chooser” will pop up. You should see the Genymotion device you’d started previously, select it and you’re good.
Hope this helps…

Run as Android Application

I start Eclipse as a fresh install with all tools updated
I created a virtual device Platform 4 Api lvl 14 Cpu Arm
I try to run the default Hello world by "Run as Android Application" and nothing happens, literally nothing. If the VD is not open when I click Run as Android App then the Virtual device doesn't load up. If it is already opened then the application doesn't load into the device. Basically clicking the "Run as Android Application produces no error log and no results. I have tried this with a number of differently configured V Devices and everything seems to run fine besides not being able to load a program onto a Virtual device.
Its probably something obvious but its preventing me getting started, any help please?
try this:
go to Project properties(Right click on the project select properties from context menu)
Select Run/Debug Settings from left pane
Delete All entries then Add a new one
In project filed select your project

Categories

Resources