I'm testing on a Nexus 5, with Android Studio, on a Mac. I used to be able to just plug my phone into my laptop, but lately when I go to run my app, it doesn't detect my phone.
In order to fix this, I have to go into the phone's Developer Options -> Select USB configuration -> toggle between all the modes until one of them works. Before it would just be MTP, but for some reason it seems to be pretty random which one actually does the trick now.
USB debugging is on. I haven't revoked any debugging authorizations... I know this isn't a huge problem, because I can just mess around with it to make it work, but it's super annoying since it does this every time my laptop goes to sleep, close Android studio, or unplug my phone.
I had the same problem, I simply changed the USB cable and then everything was working fine. Hope this helps...
Related
The first day my V60 thinQ smart phone worked fine with android studio. The next day after working on my project for about a hour my smart phone no longer showed up in the run/debug configurations drop-down. I was not able to run the app on my device.
I went to trouble shoot device connection
When I clicked on Re-scan device my smart phone showed up. Also in windows Explore my smart phone shows up,
Right before my device stop showing up a dialog came up asking me what i wanted to do after plugging in my smart phone. I forgot exactly what it said and what I clicked on.
Does any one know what is going on?????
I believe, the popup that you saw right after plugging your device is asking if you trust your PC to connect over adb usb-debugging mode.
Sometimes, this happens to me. The way it works for me is: going to Developer Options > USB Debugging Mode. Then, i disable usb debugging then, re-enable it again and after that usually Android Studio detects it or, it shows the popup again. If you don't see the popup just unplug and re-plug your device once.
The popup should look sth like this with an RSA fingerprint of your computer:
Now, you have to click: "Allow". And, android studio should detect your device.
I have fixed this problem before but I can't now and I need a permanent fix. Everything has been going fine in Android Studio when it comes to testing my app. I now run into the problem "The selected device is incompatible." when I go to run the app. I'd like to know how I can keep it from reading my phone's API as 1 rather than changing my minSDK to cater to this problem, if possible.
EDIT: Literally just found a fix, not sure if it is permanent. I just restored my defaults in Development Options, turned USB Debugging off and on again and that did the trick.
All I had to do was turn off USB debugging, then turn it back on and it worked immediately. I didn't have to reboot or change any other settings.
Not sure if this helps. I had a similar issue using my MotoG 2nd generation with Android Studio on Ubuntu. I switched the settings as how my phone was connected from MTP to PTP. That worked for me.
I had a very similar issue,
Usually whenever I connect the android device for usb debugging, the device will prompt me asking for the permission from to access from the development PC
In my case, for some reason, I didnt get this prompt and hence, I got this error. I have turned off developer options & USB debugging, turned on again. Then, I got the prompt and the issue is solved
Programming on my Android device in Intellij was working fine for a while, then all of a sudden my Android device started not being recognized-- "USB Not Recognized". I have tried re-installing my drivers, restarting my phone, restarting my computer, and setting up a new project but nothing seems to work. My phone is still recognized about half the time, but I randomly get the USB Not Recognized error.
Same. I get this error very often.
This is how I usually fix it:
Use another cable.
Turn Android debugging off and on again.
Reboot the phone.
Use another USB-port.
Use another USB-port with another cable.
Dunno why. Any pro's who can answer this? :)
I just solved my issue with a really weird fix. It turns out that with a lot of wear, the tongue (which is the little prong that is in the middle of where the USB cord goes on the phone) that the connector goes around can get bent. I figured this out because pushing the front end of my connector down on the tongue made the connection work and pushing the connector up made the connection stop. I read somewhere that if you take a knife or a toothpick and push the tongue up gently, the tongue will bend slightly and return to a position where it can form a proper connection, and oddly enough I tried it and it worked. Weird. Hopefully this helps someone. Just don't push too hard up on the tongue and only do this if you're sure you don't have a driver issue.
This works on ubuntu: sudo adb start-server
Settings -> Storage. Click settings dots ‘USB Computer connection’.
Check the ‘Media Device’ (MTP) check box. If already checked, try checking/unchecking it.
This worked for me
I just tried with the USB and it is working now perfectly.
Use your usb pin to push it up by connecting it to the mobile.
connect the cable with your mobile then slightly move it towards UP.
But be carefull while doing that as it may bent it completely.
I have a problem debugging apps on my Samsung Galaxy S3, (GTI9300, I believe this is also known as the international version) from Eclipse.
The thing is, debugging actually worked for a time and then it just stopped working. I've tried quite a few things to make it work again. I'll describe my whole experience briefly, to keep you from suggesting things I've already tried, and save us all some time.
When I first got my phone, debugging didn't work. When I plugged in my phone, the system detected it, and I could use it almost like a storage drive (using Media Transfer Protocol or some such thing) But when I started Eclipse and tried to debug, the debugger didn't see the phone.
I googled some, learned that I had to install some specific driver. I honestly don't remember which driver it was, but I believe it was an official one (from Samsung's website). Once I installed this driver, Windows would no longer detect my phone as a storage device. But the debugger did see it, and I was able to debug a few simple apps that I'd made. I could easily live with this tradeoff.
Then I got busy with other stuff and set Android development aside. I came back to it this weekend - after 2 or 3 months - only to find that it no longer works. No matter what I do, the debugger does not detect my phone (Windows still won't detect it either).
I tried all the first aid solutions like restarting Eclipse, rebooting my computer and rebooting the phone. Just for the sake of completeness, I do have usb debugging enabled on my phone.
The only major change of the whole setup that I can think of is that my phone's OS has recently updated. I don't know the exact version it was before, right now it's Android version 4.1.2 (Kernel version 3.0.31-1160235, if this is useful to anyone). I tried plugging the phone into other computers, it gets recognized as a media/storage phone. I can't install the Android development tools and try debugging on any of these computers - I'm stuck with the one I've got.
I've tried reinstalling the usb drivers for my phone. It didn't help. In desperation (and against my better judgement) I tried installing Samsung's software, first AllShare Control, and eventually Kies. None of it helped. When I run Kies, it gives me the option of connecting through USB or via WiFi. However it won't detect my phone when I plug it in. When I click "Troubleshoot connection" (or some such thing, unfortunately Kies decided to use my native language instead of English) it starts reinstalling the USB driver. This process takes quite a while, and fixes nothing.
I'm basically out of ideas, I don't know what to try next. Any help would be appreciated.
The emulator won't launch my apps even on a real device! I've tried every solution online, even reinstalling android sdk,ADT plugin. The app run SOMTIMES(4x to be exact) though, like awhile ago, when i got home i tried it again, and it run on my first try then i began working on the code again then i tried to run it, won't run again. Even basic apps like hello world won't run most of the time. I've set the run configuration to let me choose my device everytime, but even the device chooser wont show up(showed up once only), i tried waiting for 30 minutes(also tried the kill-server start-server) but it just wont run! my real device, or the emulator is listed on the DDMS perspective and there's nothing on console. please help, cause I've wasted 2 days for this already.
Have you also tried, taking the USB cable then disabling debugging and then enabling debugging and putting the USB cable back.
I remember this happen to me, so I did what I mentioned and surprisingly it works. Hope it work for you too.
Maybe you should try deleting your emulator and creating a new one. Make sure that all your settings are correct and that you are targeting the right OS version.
I've had quite a few problems with the emulator and wiping them and starting from scratch worked more often than not.
As for the real device, the first real hurdle is getting the right drivers so that your PC can recognize it, after that kill-server start-server usually does it. I'm surprise that didn't work for you.