Android Studio doesn't start with connected device - android

I have installed Android Studio v0.1 on Mac. My project imported and built successfully. AVD shows up whenever I run or debug the project, even though my device is connected and shown in integrated DDMS. I have double checked with adb devices from command-line and it shows my connected device. Please help~

// the very First time it will always selected only emulator options
you need to change it in Create Run Configuration...
in that General Tab select Target Device
Show chooser dialog
USB Devices
Emulator

Visual aid to #Padma Kumar's answer.
"Android Studio is not starting from Device", "Force to start Android Studio from Device"

Related

Android Emulator not working on M1 Chip Mac

Installed Android Studio. Created a device. Did a "Cold Boot Now" and it just sits there and never connects.
I get the message "Connecting to the Emulator" and that's it.
Connecting to the Emulator Screenshot
Some people have had issues like this with the embedded, tool window emulator. You can launch the emulator as a separate process by going to Android Studio preferences, Tools -> Emulator and unchecking "Launch in a tool window".
Update: The issue is fixed in emulator 31.2.7 now available in the stable channel.
You can try to use images from the Other images tab. You can see this tab while creating new AVD after choosing device.

When I'm running an app on Android Studio the "Choose device" box doesn't show

I'm trying to run a simple code on my phone (Genymotion doesn't work, so I had to run it on my phone directly) and it tells me that "External task execution finished" but Choose device box doesn't pop up when I press "Run". I installed:
ADB driver.
My phone is Xperia Sp, so I change MTP to MSC (There's no PTP).
USB debugging is on.
Furthermore, the Android Device Monitor is showing my device, so there's no problem with identifying my phone.
In Android Studio:
Goto Run menu
choose edit configuration
select android application
select app in general option
In this option showing "Deployment Target Options" then Target,
choose "Show device chooser dialog".
May be your deployment target is changed.
Please check android studio setting
Click On
Run >> edit configuration >> under Android Application Click on App >> check deployemnt target option.
In the newer version of Android Studio the "Deployment Target Options"-Section is gone.
The Dropdown-Menu for choosing the device is in the toolbar next to the "run"-Options.
Here is the instruction to run an application in a device: https://developer.android.com/studio/run/device.html
You can see how many devices connected from tools -> troubleshooting device connection error.
In my case, android studio found my device as a USB device but couldn't connect so I replaced the USB wire and it worked like a charm.
I had the same problem when I was trying to run the app through USB and also Deployment target option was not present there. I solved it by following these steps:
In the Navigation bar there is a search option, Search for Device Explorer, select the device explorer.
Re-plug the USB once and you will see there will be a list of android files of your device on the right side of the window (make sure USB debugging is on and install via USB is on).
Keep the device in that mode for a while, you will automatically see your device's name on the top where no device option was previously visible.
After this then run the app...
Hope this will work.

Genymotion Device doesn't appear on Device Chooser - Android Studio

I installed Genymotion with a virtual Box and the Genymotion plugin (Android Studio), created a new device and runs properly, even from Android Studio.
However when I hit the Run button, the Genymotion device does not appear on the Device Chooser, it says 'Nothing to Show' under the 'Choose a running device' radio button. How can I get the Genymotion device to appear on the Device Chooser and run my app? Is it something I am missing from the SDK manager?
This happens because Genymotion is shipped with outdated Android tools. To solve follow the steps:
Open Genymotion app,
Go to Settings -> ADB
Select 'Use custom Android SDK tools'
And select location of your Android SDK.
On Mac with a recent version of Studio that would be:
/Users/username/Library/Android/sdk/
I had the same problem,
but I solved it.
Before running genymotion you have to first click on run and wait until project compile and show you the empty device list and then you have to start your genymotion, after that it will appear.
click the run button to compile project
device empty list appear
start genymotion
device will appear in the list
That worked for me. Hope it helps.
Got the same issue on AS 3.3.2, I tried to select location of the Android SDK, or kill / restart the server. Still they didn't work.
After that, I install the genymotion plugin in AS and open the genymotion device manager, then check the actual ip address of the active genymotion device.
adb connect device_ip_address:5555
Now the device can be detected on device chooser.
P.S. Thanks #Ismail Iqbal for pointing out that the genymotion plugin is not necessary. You can also get the ip address from the emulator header.
I also am facing the same issue in new version of Android studio. following is my routine that everyday i am doing to solve this issue:
Click Run icon to see empty list of device
Close this list
Kill adb by:
adb kill-server
Sometime you need to run this command twice.
Start adb again by:
adb start-server
Click run again. Now I will see list of my emulators but not my Genymotion that is already up and running!
I will add my Genymotion by:
adb connect 192.168.56.101
This command has to be run when select device dialog is still open.
Now everything will be OK.
On Android Studio 2 :
Click on button "Attach debugger to Android process" on Toolbar.
Click restart.
Try run again.
Goodluck.
Tools->Android-> Remove check "Enable ADB Integration"
Run your app with appeared device.( you will get an error)
Set check "Enable ADB Integration"
Run your app
You can solve it quickly.
First make sure that genymotion emulator is opend.
close device chooser (On andoid studio)
open task manager(on windows ctrl + shift + esc)
pick process tab
find adb.exe maybe its adb.exe*32
right click and select kill process tree
adb will again appear shortly kill its process tree again( maybe
more than one adb will be found kill all.)
then open device chooser (click run on android studio).
I solved mine by:
First start android studio before starting genymotion. Then run the app in android studio and wait until you see the device chooser then start genymotion
Just in case someone is still looking for an answer. The software versions in which i faced the above issuue is -
Android Studio - 3.3.2
Genymotion - 3.0.1
So, now let's start with the problem. Just try the following steps:
Check if you have enabled Genymotion Plugin in Android Studio. For Windows, go to File -> Settings -> Plugins -> Search for Genymotion and see if it is checked. If you can't find it, Click on Browse repositories , search for Genymotion and install it.
Check the tick in the plugin:
Check if the Genymotion Emulator is running or not and Genymotion Main Screen shows status as Running or ON
(This was my problem. Although my emulator was up and running but Genymotion's Status was showing Booting). It usually takes some time to get the status from Booting to ON
Check for emulator status:
Check if your Min SDK Version is less than the Emulator's SDK Version. I faced it quite a lot in my initial days. For that, Go to your Module:app gradle file and see the Min SDK Version and the Emulators SDK Version is same or higher.
Check for Min SDK Version as highlighted in the image:
Hope this helps. If you still get any problem do let me know.
When you close the device, it is no longer available to the device chooser. You need to keep running the device from Android Studio.
I tried adb kill-server/start-server. But, It didn't worked.
Instead hitting this command 2-3 times quickly worked.
adb reconnect
In my case the genymotion path was not set ..so I solved it by clicking the genymotion icon from the tool bar and enter the path (the default in windows is C:\Program Files\Genymobile\Genymotion) then after starting the emulator it now appears in android studio
First you will have to run the genymotion from the android studio by pressing the genymotion icon after genymotion starts then press the run button, you will see the genymotion device option on deployment target dialog box.
In addition to the answers of this question :
My problem was about windows viruses , Last days i turned off my windows defender and i have't any other antivirus software in my system .
My SDK folder was full of virus , when i scanned Many viruses detected .
After removing viruses from my PC i had to remove SDK completely and download it again .
Finally notice that : For any reason , if the SDK files are
damaged may cause this error .
Now the problem is solved .
For This Problem:
Go to Project structure/project
In project SDK select simulator API version.
Done. Now your genydevice is added in the list.
I've tried from the android studio version 2.0 and the version 2.1, both does not compitable to genymotion. please use the version 1.5.1 or older than that.

Connecting my Android device with Visual Studio 2015 RC

I have compiled a sample Android project with Visual Studio 2015 (RC - Community Edition), now I would like to deploy and execute it on my connected android device.
ADB seems to be working:
"adb devices" is showing my device "CB5A1N42TN device"
using the menu "Tools / Android / Android Devices Monitor" tools I am able to see the connected device
in Android Studio, I am able to deploy and run my app on the device
But in Visual Studio 2015, when executing the project I have the following error message:
1>Error installing the package. The device '' is invalid or not running. <...>
So I suppose I should input my device somewhere, but I can't find that place in the options available.
I also noticed that on the dropdown menu for the execution there is a "No devices available" message.
Thanks for your help.
Ok I found the answer , hopefully it will help others.
The configuration was pointing to "X86", once I selected "ARM" then the device appeared in the list of targets I could run the app on.
Go to the Settings screen in your android phone
Select Developer options
most importantly make sure USB debugging option is checked
hopefully your USB drivers are installed and for further details go to this page

Android Studio doesn't see genymotion

I updated 0.5 to 0.8.14 version of android studio , but now studio doesn't see genymotion , what I must do now ? Thanks for all .
Edit :I solved the problem by updating genymotion too
Genymotion by default uses it's own ADB binary. If it has a different version than the one Android Studio is using, they can conflict and you get lots of issues. One of them can be Genymotion not being detected, and problems deploying apps.
I would recommend setting Genymotion to use the ADB/Android SDK that Android Studio is also using, instead of using the default one. That way you will avoid conflicts on future updates.
You MUST install the plug-in for Genymotion first, click the "File" tab locate the "Plug-in" option, down the bottom, search for Genymotion, then install. After the installation, you need to restart Android Studio, after that, you will see the Genymotion icon near the "Sdk Manager" icon, click on it, then just specify the location of your Genymotion installation. Also, make sure you have "Oracle Virtual Box" installed in order to use Genymotion, it is a requirement.
Edit-
Then your genymotion virtual machines come up, click the one you want (I think it has to be off for start to be clickable/not greyed) then click start,
then click that green Play icon near the centre of the button bar below the menu bar, then the genymotion virtual machine should appear listed under 'running devices'. highlight it and click ok, and it should launch and show your program.
Open Genymotion Shell,use command line devices list will show the then in cmd use command line adb connect IP address.if not show devices in studio.maybe restart studio.
One words(you need find your devices ip):
adb connect 192.168.***.***:5555
2019-03-19 09:10:00
My enviroment:
Ubuntu 18.04
Genymotion Version 3.0.1
Android Debug Bridge version 1.0.40
AndroidStudio version 3.3.2
My problem:
adb devices : list is empty
no usb devices or running emulators detected
My solution :
cd /opt/genymobile/genymotion
./genymotion-shell
devices list (if no running devices start one)
in other terminal run commond : adb connect yourDeviceIP:5555
Reference:
https://stackoverflow.com/a/27262302/7707781
https://stackoverflow.com/a/24926960/7707781
I had the same problem, I close genymotion, then clicked on Run button , so the "Select Deploymnt Target" dialog opened. after that I open genymotion as administrator, start virtual device and after a minute it appear in "Select Deploymnt Target" dialog.
I think the key point is that genymotion has to be run after android studio, and maybe with "Select Deploymnt Target" dialog has to be opened!
It works for me anyway
After few research I found a solution, open task bar and just End Process the adb.exe, hit run (android studio) and adb will be recreated and your genymotion emulator will be on the list. Thumbs up
When I updated Android Studio to 3.4, same problem is occured in my system.
Open Genymotion program,
Click "Genymotion" text on the upper left corner,
"Settings" --> "ADB" --> check "Use Genymotion Android Tools (default)"
Restart Genymotion program.
Go to Genymotion → Setting → ADB → Use Custom Android SDK tools
(C:\Users\{username}\AppData\Local\Android\Sdk).
Go to Android Studio → Search for "Genymotion Device Manager" → Specific the part for Genymotion (C:\Program Files\Genymobile\Genymotion).
Go to Android Studio → View → Appearent → Toolbar.
first install genymotion plugin and restart and android studio.After the restart you will see genymotion device manager icon near sdk manager icon select it and add the path where u have genymotion folder.If u didn't see the icon then search for genymotion device manager u will get it
I have faced this problem once. I must connect it to adb server manually and it worked fine!
just follow these steps:
1- open your emulator
2- after running, open oracle vm virualBox manager app
3- double click on your running emulator. you will see Ip management value. that's the emulator local ip address
4- go to your sdk manager path, then platform-tools directory
5- open cmd on this directory (or use cd command)
6- run adb connet ipAddress:5555
after that you will see connected to ip address text on the screen. go back to android studio and you see adb has appeared!

Categories

Resources