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.
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 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.
I have installed the and adb driver on my android device which is yu-yuphoria
now in device manager my device is listed as android adb interface . But when i run any app on android studio that device is not listed . I have changed the usb mode from media to camera again installed the adb interface and restarted both system and device still the device is not listed in android studio.
i have spend hours in fixing the problem but cannot do.
few days earlier there was no such problem but now it came from no where
any possible solution
I had all those weird problems with Windows showing perfect configuration but devices not visible. With three different phones, I always fixed it with this free tool (from XDA I believe):
http://adbdriver.com/
Ofcourse this will not help if it is actually a problem with Android Studio.
I'm trying to develop an Android app using the Eclipse IDE and I want to debug using my physical Moto X (2nd gen, Android version 4.4.4). I thought it was as easy as turning on USB debugging on the phone, plugging it into my macbook (OS X Yosemite 10.10.1), running my Android application from eclipse, and selecting my device.
However when the device chooser dialogue comes up, it doesn't show my moto x in there. It shows all the Android Virtual Devices I have set up, but nothing under running Android device. What's particularly mind-blowing about this to me is that I can clearly see my device in the eclipse device view as online. I can also see it by going into the sdk folder and running adb devices. The only time to doesn't show up is when I try to run the application and select what to run it on.
Has anyone ever encountered this problem before? Is there something here I'm missing? I have the latest Android SDK all up to date, as well as my Eclipse (I'm running Juno if that matters). My Min SDK version is 11, and the Target is 21, so my device should be in that range. I have also tried restarting the device, eclipse, and even my macbook with no luck.
If you are on Yosemite, try to drag corner of one of the column headers in the device chooser box and it will show the device. This is a hilariously stupid bug on eclipse for Mac. Check this answer.
There might be something wrong with eclipse. Sometimes the only solution to fix eclipse is to redownload a fresh copy of ADT from website.
You say that you can see your device when you run adb devices.
In this case use eclipse to build your project then use adb to install the apk on the phone:
adb install /path/to/projectRoot/bin/myBuild.apk
Better yet I would take this as a sign to forget Eclipse and move to Android Studio. Version 1.0 was released today (no more beta).
I am having trouble running an app I am developing in Android Studio on my Nexus 7. I have successfully gotten this to work before using the same tablet and computer (running Windows 8), but since having my laptop repaired and everything wiped I'm convinced something with my dev environment is messed up.
When I go to run the project, there are no available devices, so it is not recognizing my Nexus 7 anymore.
Things I have tried
making sure my computer recognizes the device and that I have the Nexus 7 driver installed from ASUS
going to the SDK manager and ensuring I have the Google USB driver installed
closing Android Studio and re opening it, restarting my computer, restarting my Nexus 7
killing adb.exe from the task manager
ensuring I have USB debugging enabled and toggling that on and off
switching from MTP to PTP and back again (currently connected as MTP, not sure if that is correct)
Any help would be greatly appreciated. This is very frustrating and I would like to just get back to developing again.
Update- I just noticed that when I go to developer options, "Wait for debugger" (near where you toggle USB Debugging) is grayed out. I think this has something to do with it but I'm not sure how to enable it.
I got it!
This was at least the issue in my case, I hope maybe this will help someone someday, apparently I had not installed the adb driver properly:
Search for Device Manager from the search bar on the start screen
Open Device manager, click on your Android device
Select"Update Driver Software"
BOOM. Now Android Studio recognizes the device.
I know this may not be the solution for everyone, but its worth a shot if you are having trouble testing apps on your device.
Between upgrading my second-gen Nexus 7 to Android 5.0.x and Android Studio leaving beta I lost the ability to debug on my tablet.
To get this working again I used a combination of the above advice.
I grabbed a copy of the USB Driver from Asus, but updating the Device in Device Manager and pointing to the unzipped files wasn't enough.
The next step was to point Device Manager to the Android Studio sdk directory (on a 64-bit Windows 8 install that was C:\Program Files (x86)\Android\sdk - beta versions of Android Studio - or %localappdata%\Android\sdk - switched to in 1.x) and then things worked just fine again.
Another possible reason that you may not be able to connect is:
Don't forget to enable debugging mode in Android setting.
I have had the same problem, although just getting started with my Nexus 5 and windows 7. I installed google usb driver package using SDK manager first, computer recognized phone but studio could not find it. Went in to manually update driver for phone but update driver couldnt find it, downloaded driver separately and pointed it to directory path, driver installed then studio found it and ran fine.