I am using a MACbook. For one specific emulator its always showing offline. The emulator has a nexus 5 skin and is a api 24 build. When i try another emulator its fine and works. i tried re-creating the emulator. when i run adb devices it says the "unauthorized".
I tried the following:
I went into the developer settings of the emulator and allowed usb debugging if to see if that would help but it did not. this happened after i updated android studio to 2.3. i also tried to wipe user data from emulator. What is going on here ?
UPDATE: THIS IS OCCURRing for my other emualtors above api 22 also . i had to switch to genymotion for now which seems to work fine and shows as online. it has something to do with updating android studio. after i re-installed studio and did not take the 2.3 update, the problem was resolved.
Don't know the exact issue but it appears there are some bugs/issues with the latest updates.
Personally I am seeing my tests fail when run by ./gradlew commands, but not when run via Android Studio IDE.
I experienced your offline issue as well, I found I could at least rectify this by running:
adb kill-server
adb devices
More info on this in another post:
https://stackoverflow.com/a/21330228/5096103
-- UPDATE --
After investigating this one a little more, I found there to be compatibility issues between Qt version 5.7.0 which the new emulator uses, and Ubuntu 14.04 and it's version of Qt. Whatever system you will be using, you will have some version of Qt installed.
I'm guessing this may be the cause/related to the issues you are experiencing.
I was successfully able to fix my system by downgrading the SDK tools from version 25.3.1 to 25.2.3. I don't get the speed improvements of the new emulator, but at least I can run my tests reliably.
Going to try resolve the issues between Qt versions, and will update this if I can get the new emulator to work correctly again.
I had the same problem. I solved it by turning on USB debugging after unlocking developer options of the emulator by clicking 7x on the build number.
Related
i'm using android studio in windows server 2016 and have next problem: for work task i need to start android device emulation. On windows 10 emulator works fine, but same steps on windows server cause problem -"the emulator process for AVD_Pixel3A was killed". What should i do?
p.s: hyper-V components not installed, virtualization is accessable.
You will need to to have the H-visuals turned on.. Also check to see that you have HAX installed. Also be sure to turn on developer mode within the computer... I would also run the program on a physical android device to see if you get the same issue.
Also if none of these work you might have to check to see if the server runs the minimum requirements. If it does you may have to reinstall Android Studio. I had this happened to me the other day. I uninstalled and reinstalled Android Studio and it fixed the issue.
I just upgraded my android studio to 4.1 version:
And tried to run some project on this emulator:
And for some reason, this specific emulator is crashing my android studio, I have noticed that I am getting an error:
After reading about the subject, I uninstalled "Riot Vanguard" but it did not solve my problem.
More info (and partially solving the problem ) can be found in "Update" at the bottom of the question.
In addition, moments after my android studio will get closed I will get a windows blue screen (happens every time).
I didn't have this problem earlier with android studio below 4.1 version, why is this happening?
Update (problem solved for others emulators)
I have run into the same problem on other emulators as well, but I could open those emulators so I could fix the problem:
Solution 1
According to most threads that I have run into, You will need to disable or uninstall "Riot Vanguard":
Open task manager, go to the startup tab, right click on Riot Vanguard, and press disable
Solution 2
If step 1 didn't fix the problem you may want to enable developer mode on your emulator.
For some reason with android studio 4.1 android studio could not find the emulator (It will tell you that there are "No connected devices") without enabling the developer mode
Before Android studio 4.1 version I didn't need to enable the developer mode to run projects on emulators and this is what solved the problem for other emulators for me.
BUT
Although I don't have any problems with other emulators at all I still can`t even open Pixel_3a_API_30c68 emulator without it crashing
How can I fix this problem on the specific emulator?
Update 2
The problem still occurs even After updating android studio to 4.1.1
Without having "Riot Vanguard" I also could not run any emulator in Android Studio since I upgraded to version 4.1. After some hours I finally found out what caused the problem (in my case):
"Android SDK Tools" have been replaced by other SDK tools (which ?) and is obsolete now. As soon as I UNINSTALLED "Android SDK Tools" the emulator worked again.
I would be interested to know if the java version makes a different. I moved from Windows to Linux because of problems running the emulator.
Linux worked great until I moved to Android Studio 4.1. So check java and it was version 11. Changed to java8 and it worked straight first time.
Seem to remember there was a setting in Android Studio to set the SDK which I think was version 8. But can no longer find this in settings in Studio 4.1.
Updating to the latest system image of the SDK helped me.
I am having an issue with Android Studio not connecting to any devices. This includes physical devices, as well as emulators. Everything was working, but I updated AS to the latest version, and now it is not working. The devices still show as connected when I use adb on the command line, so I am able to run commands through that. However, I can not run anything from Android Studio, or debug, or use logcat. What could possible be the issue where adb is connected to the devices, but Android Studio is not?
Even using the connection assistant shows that I have a pixel connected, but AS does not recognize it as an android device.
This is for Android Studio 3.6.2, updated recently: Directory 'platform-tools' contains a directory of the same name, and I made the hypothesis that this was a bug and that the lower dir should not the there. Using the Mac Finder, I copied all files and directories from the lower dir to the upper one, I closed and restarted Android Studio, and voila, the Run > Select Device... can see my tablet, and I could run the app on it.
I'm running on a mac with Yosemite. I tried running old versions of Android Studio that were laying around which was a waste of time. So I got drastic.
This is a really bad solution, but has allowed me to actually get back to work.
Completely uninstall Android Studio and the Android SDK (the sdk might have been over-kill, but I'll let someone else figure that out). If you like, here's a website that helps uninstall AS. https://nektony.com/how-to/uninstall-android-studio-on-mac
Re-install Android Studio using an older version. I used 3.5.2 because I liked that color of green better than the new one. The link to find it: https://developer.android.com/studio/archive (you'll have to agree to their terms before being able to even look at the list!).
Run the newly-installed AS. Connect your device (remember to turn dev-mode!)...voila!
Well, it worked for me. And I only wasted 1 day.
Today I downloaded Android Studio for my Debian Testing system. I wanted to run a HelloWorld application but weren't able to run it. With adb I can install it without having any problems.
However, if I try to do it with Android Studio, it gets stuck on 'Installing APKs'. The same happens when I try to start it in an emulator (gets stuck on 'Waiting for target device to come online').
My device is a Samsung Galaxy S3 with LineageOS (Android 7.1.2) and root permissions. Android Studio recognizes my phone properly.
What I've already done:
installed openjdk
set android_home
installed all the SDK-platforms since Android 4.3 and Android Emulator from SDK tools
enabled USB-debugging
tried with MTP and PTP
tried another emulated phone
installed lib32stdc++6
restarted my computer
and probably much more
I tried to do it the whole evening and couldn't find a solution. Is there something Debian-specific because I can only find instructions for Ubuntu? I have never experienced anything close to this on other systems.
Thank you in advance.
EDIT: I am now able to use my phone to run the android application by using USB 2.0 instead of USB 3.0! Is that a normal behavior since it works with native adb? I mean, if I buy a new PC after some years which has got only USB 3.0 ports, will I not be able to use phone debugging with Android Studio or is this just an issue? It is still known since 2014 (https://stackoverflow.com/a/9548311/8292104).
However, I still cannot get the app running on an AVD. I changed graphics to software, now it shows the phone but the screen remains black and the phone won't start. What can I do to fix it?
Try to completely delete and install Android Studio again, I think that it will solve the problem
Another possible solution that worked for me is to, in the application, go to
app - build - intermediates - split-apk - debug - slices
and then delete all of the contents within this folder. Then again, this only worked for me, so I would duplicate the document in case of corruption.
When I try to launch Android emulator, it crashes on Mac OS X. It was working some time ago, but now it isn't and I don't have an idea why.
Crash log: http://pastebin.com/04MjCqaS
Terminal log in verbose mode: http://pastebin.com/L6y6rUr0
Same issue here, I'm running a mac mini with 8GB of RAM and MacOS Lion. It used to work with the old AVD with some random crashes every now and then but since the last update to APi 17 it's a pain in the neck.
The ADT bundle doesn't work at all. After tweaking the memory limits on eclipse.ini file it throws random memory errors. Also it's not been able to download and install the m2e (maven to eclipse) plugin.
I moved to IntelliJ and I'm able to launch AVD manager but none of the "old" created devices work. If I create a new one and I launch it it works until I close it, then I have to restart the Mac and create a new device. Also it randomly shows errors when I want to delete those old created virtual devices.
Also the DDMS fails to start. I launch it, shows its icon on the Dock but it doesn't respond until I force close.
What a Nightmare.
** EDIT **
I found at android dev bug tracker this issue when you're running 2 screens: here
This is happening to me with the android emulator. I solved it like this:
cd ~/.android/avd
ls *.avd
Now choose the emulator that is crashing and
cd name_of_the_emulator.avd
touch emulator-user.ini
vi emulator-user.ini
And now reset window.x, that's window.x=0
exit and run the emulator.
If you move and close the emulator to the secondary screen it will crash the next time you want to run it.
Kill your Docker process
One problem I have seen multiple time is with Docker. Android Emulator crashes when Docker is running on Mac.
I was following the PhoneGap "Getting Started" guide for Android, and when I got to "Deploy to Emulator," after I created a new AVD, my Mac would crash and reboot. I stumbled on this thread, but thought it worth mentioning that what actually solved the problem for me was an Intel patch for the Hardware Accelerated Execution Manager located here: http://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager
This is because Android SDK use some deprecated libraries of Mac OS X. I have the same problem (sometimes even kernel panic) before I start use android device. Maybe in future versions of Android SDK this problem will be fixed.
I just updated the Android SDK manager to the latest Android 4.2 (API 17) level updates, and now all my old AVD's crash. The newly created one using API 17 works, however.
I have the same issue. You can try to create a new AVD with the appropriate API level. I am able to run these the first time(s) after creating. That seems to be a memory error.
My AVDs are able to run the first time after reboot. After this they keeps crashing.
I had the same issue using mac 10.6 and 2 monitors one through a usb adapter to HDMI.
I have tried all of this suggestions and nothing did work.
I ended up creating a new user into my mac and with the same android sdk and same eclipse with a new workspace did work.
I'm not sure whether just creating a new workspace would do the tweak, I didn't try it.
for those who come across to this annoy issue worth to try it before switch to a new account.
You can delete your emulators from ~/.android/avd
Then create new emulators.