No USB devices android studio 3.1.3 - android-emulator

I used to run my application in VIVO Y51L device. It's showing as No USB devices detected.
Developer options and USB debugging is ON, but it is still not detecting. What should I do??

This is probably due to improper driver installation or adb. Although this should not have happened if you had it working earlier re-installing the drivers should fix this. I'd recommend you to download and run the 15 second adb installer. It would install adb system-wide and also give you an option to re-install the required google drivers.
Installing them should fix this. You can verify that your device is connected by opening the command prompt and typing adb devices. It should kill the daemon and restart it. Once you switch back to Android Studio and run it. Your device should show up there.
Good Luck.

Related

Android Studio device list stuck on loading

Picture of the issue
I'm trying to add my physical phone to the device list, however, the device list is stuck on loading.
I try to Kill adb process (on Task Manager on Windows) and Open Android Studio
And also I Try to reinstall Flutter and resetting the Flutter SDK, but still the same problem.
For me this fixed the issue:
First close the android studio and kill the all the related bg
processes.
Restart pc and check there are no bg processes running.
Now connect your Android Device (make sure USB debug is enabled).
Revoke the debug permissions and then allow debugging.
Now on pc run adb devices command from terminal.
If your device is displayed then proceed to open Android Studio and
wait for some time.
Also make sure that there is only one version of adb is installed.

Android Studio: The emulator keeps crashing after sometime

Every time I run the emulator it runs normally at the beginning but after a couple of minutes it crashes and it's giving me this error:
emulator process finished with exit code 1073740791 (0xC0000409)
I am using windows 10 home edition. virtualization is enabled in bios. I don't have any other virtualization software installed (like virtual box).
any idea why this is happening?
It seems a buggy graphic card driver can cause a similar problem. I am not sure if this is generated your problem here or not, but it is worth to say; If you have an NVIDIA graphic card with the driver version of 378.49 (there may be other versions too!), you may experience this error due to some incompatibility with java.
Please update your graphic card driver or rollback it to version an older stable version and try again!. And read here for more information.
I might have an Idea what your problem is:
Restart the adb Server, you can do so by using the command Prompt in the following way:
First go to C/users/(YOUR USERNAME)/AppData/Local/Android/Sdk/platform-tools with the cd command.
Then just type adb kill-server, and adb start-server, so like this;
cd C/users/(YOUR USERNAME)/AppData/Local/Android/Sdk/platform-tools
adb kill-server
adb start-server
If that doesent work try to wipe and cold boot described in this question.
Try this :
Go to Tools ==> SDK Menager ==>Android SDK
(Appearance&Behavior=>System settings=>Android SDK)==>SDK Tools==>Intel x86 Emulator Accelerator(install this).
It will solve your problem.I hope it helps.
Here are a few things you can try:
Go to AVD manager and open settings for your virtual device. In the Emulated Performance section for graphics, change it from automatic to software.
Have a look at here. There could be an incompatability with other software incompatibility with other software such as Docker, Oracle Virtual Box and other products that use VCPU.
You could try a complete reinstall of Android Studio and make sure all updates are completed. There could be a bug in an older version of the emulator you are using that's fixed in a more recent release.
Edit
A couple more things you could try:
Open Android Virtual Device Manager, then click on options for virtual device, then wipe data, then cold boot.
Go to C:/users/(username)/AppData/Local/Android/Sdk/platform-tools in a terminal, then type adb kill-server, then adb start-server.
Edit
You could also try checking for memory leaks https://developer.android.com/studio/profile/memory-profiler and you could try increase the amount of RAM available for the emulator.
Go to Tools->Android->AVD Manager, then edit your AVD, then in the pop-up window click Show Advanced Settings, then finally increase the amount of RAM.
Edit
IT could be an issue with libGL or libstdc++. See here
It sounds like the emulator may have not installed correctly. Check these steps:
Ensure that you have installed Hyper-V . Documentation for running emulator on AMD
Then try this step to force a cold boot:
Android Studio Emulator and "Process finished with exit code -1073741511 (0xC0000139)"
If Its crashes again, then create a new emulator. You might also try and download a new image just to make sure that the one you installed is not corrupt.
You said you're using Windows 10? Error code 0xC0000409 is caused by a stack buffer overflow. It seems to have popped up a couple places all related by windows systems (might be totally irrespective of the android emulator). If this is the case I found a couple threads that might help solve your problem.
http://www.cplusplus.com/forum/windows/39061/
https://answers.microsoft.com/en-us/windows/forum/all/werfaultexe-the-exception-unknown-software/627da5c0-004a-e011-8dfc-68b599b31bf5?auth=1
http://windowsbulletin.com/solved-exception-code-0xc0000409-error/
https://www.tenforums.com/tutorials/16397-repair-install-windows-10-place-upgrade.html

How to prevent launch Ionic app on emulator

I'm working on ionic App and I'm trying to run App on real Android device, But when I run ionic run android in terminal, I get the following error:
Running command: "C:\Program Files (x86)\nodejs\node.exe"
D:\wamp\www\pars-app\pars-app\hooks\after_prepare\010_add_platform_class.js
D:\wamp\www\pars-app\pars-app
add to body class: platform-android
ANDROID_HOME=D:\Sdk\android-sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_45
No target specified, deploying to emulator
ERROR running one or more of the platforms: No emulator images (avds)
found.
1. Download desired System Image by running: "D:\Sdk\android-sdk\tools\android.bat" sdk
2. Create an AVD by running: "D:\Sdk\android-sdk\tools\android.bat" avd HINT: For a faster emulator, use an Intel System Image and install
the HAXM device driver
You may not have the required environment or OS to run this project
How to prevent run app on windows emulator? I want to run app on real device that conected to my computer.
I am using windows 8 and Huawei with Android 4.2.2
::note
I have read these questions, But I didn't got the answer!
Why not work Ionic app testing on android real device?
Ionic run android does not run app on device
ionic run android - configurations not running app on device
As a complement to #OClyde answer, you could try :
adb kill-server
adb start-server
To have infos about these commands :
adb --help
Nb : Sometimes, for a reason i do not know, the connection between my phone and the computer break. Running this fixes it.
To make sure that your app is not installed to an emulator but to your device, take the following steps:
Open up your console and run adb devices. This should give you a list of all devices available (real devices as well as running emulators) to the Android Debug Bridge. If the adb command is not recognized check that you have installed the Android SDK correctly and that you've set all the necessary environment variables accordingly.
The adb devices command might give you output similar to this:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
This indicates that the ADB wasn't ready before, so in this case just try to un- and replug your device and run adb devices again to see if the device is listed afterwards.
If your device is still not showing, check that USB Debugging is enabled on your device. Therefore you first have to enable developer settings, which you can do by tapping the build number (Settings => About Phone) 7 times (no, that's not a joke ;) ). After that, you'll have the developer options in your settings menu. Open these and check "USB Debugging"
If still your device isn't recognized by the ADB, change the USB connection mode. You can either do this in the developer options as well or tap the notification shown when the phone is connected to your PC. Try MTP as well as PTP, on of those should do the job.
After these steps, it should be nearly impossible that the device is still not recognized by your PC. As soon as there is a phone available, Ionic will install the app on the phone automatically instead of launching an emulator.

Unable to launch Android emulator from Eclipse/Linux

I'm using Eclipse Juno (build 20120920-0800) on openSUSE 12.2 to code Android applications.
I have installed the SDK by uncompressing it into my home directory (if I install the SDK via YaST package I can't download stuff unless I'm root). I installed ADT from Eclipse Marketplace, configured the path of the SDK and configured a couple of emulator configurations.
I can run and debug fine on my phone, and I guess the same applies to my tablet even if I haven't tried yet.
The real problem is that I can't run the emulator. Clicking on the bacarozzo debug icon prompts me to run the application on the device but doesn't show me available emulators.
If I open the device manager I'm shown with the virtual devices I created but I can't just start any. The progress bar reaches the end, I see no emulator screen and if I try to delete the emulator I'm warned that the instance is running... (OK in the screenshot there is only one, I already managed to delete the other)
I urge to test some GUI features in an outdated version of Android. I have done all the field tests of the business logic code in my program on a JB device and I know for sure that code works on any device.
Now I only need to be backward-compatible with preferences and layouts.
How can I start the emulator in Linux?
Just by luck I managed to run the emulator from console
djechelon#RAYNOR:~/android-sdk-linux/tools> ./emulator-arm -avd Emulator_cell
It came to life and Eclipse debug is detecting it as active device

Why doesn't Eclipse see my Samsung Galaxy phone even though I can transfer files using a drive letter?

I developed my first (small) Andoid application using Eclipse and are now ready to transfer it to my Galaxy S mobile device (develping for Android 2.1)
Following another thread in SE, I changed the run mode in Eclipse to manual in the hope that I would be able to chose my phone and/or AVD every time I run the program.
The popup list howerver only show the AVD, my phone is not present in the list.
So obviously, my Samsung Galaxy S device is not recognized. Howerver, I can transfer to and from the device using a drive letter, so the USB connection is working properly.
Anyone any idea what I am missing here ? I'm not sure if it is an Eclipse problem , or a driver or ....
You have to put the phone in 'debug' mode - I don't have the instructions handy (but you can search here or on the android site for the info you need)
I experienced the same issue with Eclipse on a Mac OS X. Simply putting the phone in 'debug' mode (Settings -> Applications -> Development -> USB debugging) did not solve the issue. I have to do below in the command line to solve the issue.
sudo adb kill-server
sudo adb start-server
I faced the problem of eclipse not detecting my xperia x10.I installed sony ericson PC companion, the problem is fixed now. Seems some drivers specific to the manufacturer of the device is required.
For those still looking, you don't need to install the bloat. Go to: http://www.samsung.com/us/support/owners/product/SCH-I535RWBVZW
Click on "Manuals & Downloads" and then "Software" under that.
I was having problems connecting to my S5 from my Linux laptop (after enabling USB Debugging) - I found this guy's post really helpful!
https://androidonlinux.wordpress.com/2013/05/12/setting-up-adb-on-linux/