I can't run Genymotion on my PC. I've already changed the path of the ADB location to my local ADB.
In Android Studio all SDK packages are up to date and I've got the path to the local SDK from Android Studio so it is using the same.
If I am trying to show all devices I get the error:
My environment:
Windows 10
Genymotion Version 2.12.0
This happens when the adb binary used by Genymotion is incompatible with the one from Android Studio.
The setting you set should avoid the problem, but you must "reset" your setup to make sure all the softs use the exact same adb binary. I suggest you to close all the Genymotion devices, then close Android Studio and restart all.
Also, check that the adb you are using on your terminal is the one from the Android SDK.
Related
Uber goal: debug/deploy react-native android application on Windows machine
Problem: When deploying to the emulator react-native run-android fails with > com.android.builder.testing.api.DeviceException: No connected devices!. I tried running adb devices, but that returned no devices. My assumption is that to get this working I need to at least make adb aware of the emulator, and so here I am.
Versions
Windows 10
Version 1703 (OS Build 15063.540)
abd
Android Debug Bridge version 1.0.39
Revision 3db08f2c6889-android
Visual Studio Emulator for Android 1.1.622.2
Android OS hosted by emulator KitKat (4.4) API Level 19
Emulated Device 5" screen XXDPI Phone "Similar to Samsung Galaxy S5, Sony"
Setup
Android OS:
Enabled developer mode
Turned on USB Debugging
VM:
2 GBs memory
2 virtual processors
1 Windows Phone Emulator External Virtual Switch
1 Windows Phone Emulator Internal Virtual Switch
Result
adb devices returns that it can't find devices followed by two blank lines:
List of devices attached
<blank line>
<blank line>
What has already been tried/verified
Verified emulator boots
Verified emulator has a network connection and IP address (I can reach internet from emulated android)
Verified I can ping said IP address from the host Win 10 machine
Verified I can find (via adb devices) and deploy (via react-native run-android) to real device attached by USB
Tried forcing adb connection with adb connect 192.168.0.2:5555 and adb connect 192.168.0.2:5554 and received following error:
unable to connect to 192.168.0.2:5555: cannot connect to 192.168.0.2:5555: No connection could be made because the target machine actively refused it. (10061)
Couldn't find remedy for this online
Request for Help
If anyone knows what might be going on and can provide some guidance to resolve, I'd greatly appreciate it. If you need any additional information just ask, and I'll provide it (helpful hints on how to gather it, if non-obvious, would also be appreciated).
Thanks so much for reading this far :)
I was facing similar issue and in my case the setup was like following
Versions
Windows 10 pro Version 1803 (OS Build 17134.165)
Visual Studio Emulator for Android Android
OS hosted by
emulator Marshmallow (6.0.0) (4.4) API Level 24 Emulated Device 5.7"
screen XXDPI Phone "Similar to Samsung Galaxy note4"
In my case I also installed Android Studio which I think it has contributed to the problem by installing SDK under my user folder
C:\Users\[name with space]\AppData\Local\Android\Sdk
Visual Studio also installed Sdk in program files
C:\Program Files (x86)\Android\android-sdk
I decided to move/install android-sdk in c:\Android to avoid issue
Android SDK location should not contain whitespace, as this cause problems with NDK tools
Solution
What I had to do was to consolidate all the Environment variables and Registry entries to point to the right folder
This Stackoverflow question/answer would help in setting registry
'Visual Studio Emulator for Android' devices are not listed in the Android Device Monitor
Then from within visual studio (Tools > Android > Android SDK Manager) open SDK Manager
Go to tools tap and make sure "Android SDK Location" is set to C:\Android\Sdk and also following items are checked
Then in environment variable make sure There is System Environment variable called ANDROID_HOME and the value should also be c:\android\sdk
In my case there was a ANDROID_HOME User Environment which was overriding the system one. Either get rid of that or change it to c:\android\sdk
Once you've updated all these registry and environment variables close all command prompt windows and open a new one (to have environment variables set correctly)
Then check android home by running following command
C:\>echo %ANDROID_HOME%
c:\android\sdk
Also echo %path% and it should have a path pointing to c:\android\sdk\platform-tools and no other paths
Then run adb --version and make sure it is running as c:\android\
and then run
adb kill-server
adb start-server
Once you have done that lunch Visual Studio for Android and run your image of choice. Then adb devices should return the emulator IP address
Extra Resources
There is a good documentation for general troubleshooting the Visual Studio for Android which you can follow for initial troubleshooting:
https://msdn.microsoft.com/en-us/library/mt228282.aspx
I'm using Linux Mint and I have an annoying problem with my adb:
I can use adb either from Android Studio (Android Monitor) or in terminal, but not both at the same time. Even the Android Studio Terminal found no devices if Android Monitor in Android Studio was running.
The workaround is to exit Android Studio and type 'adb kill-server' in terminal. After that I can use adb in terminal, and when I'm ready with my custom commands I have to restart Android Studio.
I have activated Tools -> Android -> Enable ADB Integration.
Any ideas to use adb through terminal even when Android Studio is running?
Make sure that you are using single instance of adb.
You are, most probably, using two instances of adb. With a single instance of adb, I can use it from external terminal, Android Studio terminal, and build/run projects from Android Studio simultaneously without restarting anything.
To verify if you are using single instance of adb run
$ which adb
or
$ type adb
from external terminal and one from Android Studio, and make sure they both are pointing to the same adb.
Hope this helps.
I am starting my first android project using nativescript.
I want to run my project with genymotion.
In genymotion GUI settings/ADB I am using custom Android SDK tools and genymotion tells me the android SDK tools are found. Also the VirtualBox path is valid, and when I renamed the device the VirtualBox name and Genymotion name both changed. The Virtualbox VM is powered down.
I start genymotion and get the emulator open with a black screen. I then run:
tns run android
per the nativescript docs
I get as output:
Cannot find connected devices. Reconnect any connected devices, verify that your system recognizes them, and run this command again.
I then tried running:
adb devices
and got an empty list so it seems my device is not being recognized, I just don't know why.
I have also tried running:
tns run android --emulator --geny nameOfDevice
This starts the emulator but again just a blank screen. So I guess nativescript knows about the device but adb doesnt?
Any help would be greatly appreciated and apologies in advance if I am missing some obvious android issue.
You should also make sure that your GenyMotion is using the right SDK.
Go to: >> Settings >> ADB
And choose Use custom Android SDK Tools
If the SDk path is found it will be marked with
Android SDK Tools successfully found!
Do not open genymotion before adb initialisation.
Start adb server first
by adb start-server
and then open genymotion to initialise emulator.
After that you should be able to see emulator in list of running devices through adb command. I ran into the same scenario where adb does not list emulators if genymotion is opened before adb initialisation. I hope it helps.
My working solution is:
cd /opt/genymobile/genymotion/tools
./adb devices
You have to use its own adb tool.
I'm new on Ubuntu and install Ubuntu 14.04 LTS and for framework I download non-installable Android Studio and SDK tools separately.
I tried this link for Installing USB device on Ubuntu. I succeed in installing USB as MTP. but it wont load in Android Studio. when I run my app "waiting for adb" dialog is shown and finnaly says ADB not responding.
first I thought this is because I don't install adb so I install it with command:
sudo apt-get install android-tools-adb
but still phone wont load for launch app. is this ADB issue or cause my Android Studio is wont installed or some thing else.
in Ubuntu you have to create a rules file called 51-android.rules.
here is the details link: Unable to use my Android device as Android emulator using Android studio
here is the gitHub links: 51-android or
51-android.rules
if you have tried many terminal commands to connect your physical device to android studio in ubuntu and you failed to connect try this :-
Connect your device and change your USB preference(device notification) to PTP,android studio will detect your device.
Android studio does not display my println and Log.d calls as well as errors when I run my application with Genymotion. I have changed the emulator settings so that it uses the same sdk as android studio does. I also made sure to select logcat with my device as target and log level verbose. This problem only occurs with Genymotion, not with the default AVD emulators. I have already tried abd kill-server and adb start-server commands without any success. How could I display the logs from the emulator? Thanks
You have to use the same adb for android studio and genymotion.
In other to do that, use the same Android sdk in both.
Genymotion: Settings > ADB > Browse (to the folder).
With Android Studio 1.3, selecting Tools->Android->Enable ADB Integration did the job