Related
I debug the app using my phone (not emulator) and the error pops up, as shown in attached photo below.
minSdk(API 19) > deviceSdk(API 1)
I have a device that uses Android 4.4.2 (API 19). It gave the same strange conflict stating the minimum was API 16 and it conflicted with an API 1 device.
This is what I did and it worked after some time. I'm not sure of the order (or the significance) of each step.
Verify that the "Android SDK Manager" had both "API 19 SDK Build-tools" and "Android 4.4.2 (API 19)" packages installed.
Set the /etc/usb/rules.d/51-android.rules has to be set by using running lsusb
and then entering the first four digits in the XXXX:XXXX pair of your device.
See the following answer for help
https://stackoverflow.com/a/28724457/149162
In the terminal, run adb kill-server then adb start-server.
After this, in the "Device Chooser" window, my device read that it was [UNDOCUMENTED] instead of [OFFLINE], but it was still incompatible and the OK button was disabled.
Plug the device in using a USB cord. Go into Settings/Developer options. (Turn on developer options, if showing. If not showing, turn on by tapping Settings/About Phone/Build number 7 times.) In "Developer options" tap "USB debugging". Device dialog box "Allow USB debugging?" will ask you to confirm your computer's RSA fingerprint. Make sure you check the option "Always allow from this computer" and tap OK button.
Run and check your "Device Chooser" dialog again. It should change from [OFFLINE] or whatever it was to the device's name with spelled out Android version and API. State field will change to "Online" and Compatible field will change to "Yes".
If you are getting this error using an emulator, not a physical device, I have also found that terminating adb.exe from task manager and then starting up the AVD again fixes this problem.
this error The selected device is incompatible means that your phone has an API that your app can't support. To resolve it, go in the SDK Manager and download the sources corresponding to your device API.
Then go in the build.gradle file, and verify that at minSdk there is written the oldest you have downloaded.
It's just strange that the APi of your phone is declared as API 1, but try to find the real API and download the sources for it.
I was also having the exact problem. Here are the steps to resolve it.
Make sure you have adb.exe in your PATH. For windows system you can find it here: C:\Users\<User Name>\AppData\Local\Android\sdk\platform-tools\
From terminal or command Prompt run adb kill-server
Now just hit the play button to start the app.
I had this exact same problem with my Nexus 5x. I believe it's related to the USB type-C cable. I took the suggestion of the accepted answer and plugged the cable into a usb hub and then into my machine and it worked perfectly.
Please do the following
Click File>ProjectStructure> Select Flavour from the panel set Min Sdk version 1
if anyone else is getting an issue with this you can check your SDK Manager and ensure that the build tools for your specific API version is installed. If it's not installed then install it and should solve the problem.
This is because you minSdkVersion of you application is heigher than that in you phone.you can fix the minSdkVersion of you application to solve this problem.
Usually whenever I connect the android device for usb debugging, the device will prompt me asking for providing permission to enable usb debugging.
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
I faced the same problem a few days ago and I solved it by using following steps:
Instead of using the Device Chooser dialog, you have to deploy it directly. Steps to fix the issue:
Open the Run/Debug configurations dialog.
Select your app configuration from the tree on the left.
In the General tab, locate the Target Device group box or the drop down menu( in android studio 1.5.1) and select the USB Device radio button.
When you run the app it will not display the Device Chooser dialog, it will deploy the app directly on the connected android device directly.
However it is strange, the message "device is incompatible" could appear also due to the lack of the authorization of the USB connection on the device. I had it just now.
After setting up developer mode, and ticking the allow USB on my phone. I ran Android studio and got API1 incompatible. I looked at my phone Huawei Y3, which was waiting for a response, "will you allow device with mac address blah to connect to your phone?". Problem solved.
I got the same problem when I switched Samsung 10" pads with a friend. Under Windows 10, I went into the DOS Command Prompt, changed to the folder containing the adb.exe file which was C:\Users\\AppData\Local\Android\sdk\platform-tools, and entered the 'adb kill-server' command as described above. When I went back into Android Studio and selected shift-F9 (Debug App). ADB restarted and recognized the new pad as compatible. ADB seems to have problems switching between devices. Interestingly, boths pads had identical Android component builds.
I was using my old mobile usb cable. When I replaced the cable with the new mobile one, and adb kill-server, I was able to connect my device. I couldn't believe it.
Let your device be connected
Disable USB debugging
Enable USB debugging
Run config choose the device.
UPDATE:
It's fixed! It turns out there was a driver on the LG site that, once downloaded, fixed the issue.
I've tried using both folders, including the usb_driver directory, but none of these directories work. It always gives me the same issue. As seen below, the 'ADB Interface' driver is most likely my android driver.
I've looked at this response to a very similar question, but none of these answers seem like they will work. I have an LG G4 phone and windows 8 on a Dell laptop. I would like to try running my application on my phone instead of an emulator, except whenever I plug in my phone, with developer mode turned on, I cannot seem to find or use my device on Android Studio. I run the application and get to the dialog that asks me to choose the device on which to run the application, but my device still does not show up. I have updated several packages on the SDK manager and tried manually installing the driver that's supposed to be in /extras/google/usb_driver/, but nothing has worked. Has anyone here been able to get their application running on their device while using Windows 8?
Make sure that USB debugging mode inside developer option is turned ON. After that you should see a dialog in your mobile to allow that computer for Debugging purpose. You can check always allow if it is your own PC
I'm developing an android app with Xamarin and Visual Studio 2013. I have connected my android applet to the computer. Sansung Kies recognizes the device. Adb recognizes it also because when I type "adb devices" the device appears in the list. But when I debug the app Visual Studio doesn't let me choose my device, it only proposes to me to use the android virtual emulator. In my device the "USB debug" option is enabled. So what am I doing wrong?
EDIT
Just got a new machine and ran into the same problem.
Following these steps:
http://visualgdb.com/KB/usbdebug-manual/
as suggested by Veverke in the comment below fixed the issue for me.
just had the same issue and fixed it with a combination of these two links. Obviously our issue isn't the exact same issue that's listed in the first link but that's why I had to use both to kind of synthesize a solution.
https://web.archive.org/web/20140410204811/http://krumelur.me/2014/01/30/xamarins-visual-studio-plugin-missing-android-devices-genymotion-and-parallels-desktop-dont-panic/
http://developer.android.com/tools/extras/oem-usb.html
Basically, in Visual Studio 2013 start the Android SDK Manager. Scroll all the way down to the 'Extras' folder, where you will find the 'Google USB Driver'. Mine was already installed, so I deleted the package, confirmed I wanted it deleted, then reinstalled it.
Then, I opened Windows Explorer and right clicked 'Computer', then clicked 'Manage' (need Admin priviledges). In the newly opened Computer Management window I clicked 'Device Manager' under Computer Management > System Tools in the hierarchy on the left.
In the main window, I expanded 'Other Devices' and saw the device I was looking for. I right-clicked it and chose 'Update Driver Software', then 'Browse my computer for driver software'.
Now you need to hit Browse... and find where you installed the packages.. for myself it was under
C:\Users\zumberge\AppData\Local\Android\android-sdk\extras\google\usb_driver.
Click next, the you need to choose to accept Google, Inc. as a trusted source.
Then the process should be finished and you'll be good to go.
Don't know if you need to restart VS2013, but I did for good measure.
Hope this helps and it's not too late.
For VS 2015, LG Nexus 4 and Windows 7, following solution works for me.
Debugging On and Off during the running instance of Visual Studio, your physical device appears in the device list.
Restart of Visual Studio 2013 has resolved the issue for me.
Details:
Visual Studio was open while I was trying to make the device visible to the system.
After installing the device driver, I have restarted the "adb" and saw that the device is added to the list "adb devices".
However the name of the device at the Visual Studio was not changed, some numbers.
After restarting the Visual Studio, real name of the device is shown "NVIDIA Shield Android TV.."
Then I did not get this error anymore.
I just ran adb command prompt and hit 'adb devices' and it showed daemon was not running. It installed itself and now i can able to see android devices there.
C:\...\...\source\repos\ABC\ABC\Ex.Android>adb devices
List of devices attached
* daemon not running; starting now at tcp:5037
* daemon started successfully
ZF22Q3T unauthorized
After enabling debug mode on my android device, I found I had to change the 'USB PC Connection' option. It was set to 'Charge Device'. When I switched it to 'Media Sync (MTP)' and reconnected to my PC it then showed up in Device Manager, but the drivers did not appear to be working with VS. I reinstalled the 'Google USB Driver' in SDK Manager. I removed my device in Device Manager and added it back using the Google USB Driver. When I disconnected/reconnected the device to my PC, Windows asked what I'd like to do with the device. I realized the first time it had asked me, I quickly clicked 'Do Nothing'. This time I noticed the first option was to run an exe on the device to install the driver. After the install completed I disconnected/reconnected the device and the device prompted me to allow my PC to debug. After selecting 'Allow', the device showed up in VS while VS was already open.
Also make sure you have the correct configuration selected for your device. (eg. ARM for most smartphones)
If its set to one that your device doesn't support, then the device won't show up even if adb can see it. Simply switching the configuration solved the problem for me.
Try restarting adb server using:
select "Tools" from top bar then
select "Android". In the list there will be an option to restart adb server as "Restart Adb Server".
After clicking it everything works fine.
It worked for me.
I followed most of the steps mentioned, but still couldn't get it to work. Some things I did were:
download and install google driver from android sdk manager
locate the device in windows device manager and update driver (pointed to the google usb driver)
switch usb connection from mtp to ptp
restarted visual studio
restarted computer
Finally, what worked for me was googling the drivers for my particular android device (lg g4) and landing on this site . Once I installed the drivers I was immediately able to debug in visual studio using my device. it works whether the usb connection is mtp or ptp.
http://www.andromods.com
In case you are using Samsung and have MyKnox installed, you cannot enable USB-Debugging until you uninstall MyKnox as stated in This Link
Here is the problem. I want to run my Android Studio apps on my device (Samsung Galaxy Ace 2). But nothing works for me. Tell me what I've missed:
1) USB debugging is on
2) ADB driver is installed (in device manager i can see Android Composite ADB Interface)
3) ADB device list is still clear, even if i reset server(adb kill-server, adb start-server, adb devices - list of devices is clear)
4) in google usb driver directory, in android_winusb.inf file I added my device identificators
5) Android device manager still cannot connect to my device, showing this error when I reset it: "adb connection error an existing connection was forcibly closed by the remote host"
So I will be glad to hear any advices. Hope you'll help me
Did you try to configure the "Media Mode" in "Camera (PTP)" instead of "Media device (MTP)"? This is sometimes solving the issue. Its in the USB Computer Connection options of your Android device, you should see an "authorize" dialog then.
Update 04/2017: looks like it has been fixed in Android 7.1.2
I have done numerous ways of handling that issue. Finally it has worked! I am using LG Optimus II, but I believe the following steps are generic to other Android devices as well.
Step 1:
Make sure your device is enabled for development. If yes, go to Step 2, otherwise go to Settings > About phone and tap Build number seven times which is magic number :-).
Now Developer Options is available in the Settings.
Step 2:
Before you plug your device to PC, Go to Settings > Developer Options and select USB Connection method.
Step 3:
Plug the phone to the PC, you are given options for the USB Connection method, and please select Internet connection. Make sure you have connected to the Internet. By the way, I have changed MTP to PTP, it did not work for me. Therefore, I tried Internet connection mode, then it worked.
Step 4:
Run the app in the Android Studio, it will ask you to authorize the device for development, and select YES!.
Step 5:
Run the application via Android Studio and choose the device, not emulator, and BINGO! Welcome to Android development board.
Try swapping the USB port the cable is plugged into.
Sounds crazy but after 20 minutes of debugging this worked for me.
I also tried above solutions but got no luck. So here's what I did:
Download and install PdaNet+ to fix connection issues between my computer and android device
Enable USB debugging on my android device
Unplug the phone and plug it again after it's installed
Run my app and voila! My android device is now recognized by Android Studio
Although my computer could recognise my phone, I had to install the official drivers from the Samsung developer site to get adb/Android Studio to recognise it:
Samsung Android USB Driver for Windows
Click Revoke USB debugging authorization in Developer option and try it again.
Solution for those working with Huawei phones - You will get this error when ADB interface is not installed. Check if you have installed Huawei HiSuite. USB driver gets installed when you install HiSuite (I suppose this is true for most of the new phones that come with a Sync Software). If the ADB interface is installed on your computer you should see 'Android Composite ADB Interface' under Android Phone in your Device Manager as shown in this picture.
If you have Mi Device than you need to enable this two option after enabling Developer Mode.
USB Debugging (Enable = True)
Install via USB (Enable = True)
See this screenshot.
LG Optimus Zone 2 pp415 d\n connect in mtp, but does work in internet connection mode. Lost lots of time messing with it. There's no doc for this, but I'd suggest trying all 4 of the connection options. Only 1 that works for me is Internet Connection->Ethernet, then win 8 auto-detects a driver and installs it. In MTP mode despite all drivers being registered with device manager, adb doesn't pick it up.
I had the same problem. So here is what i did
reinstalled the device driver
changed the USB computer connection from MTP to Mass storage(UMS)
And it worked.
For me, I tried the above. Turns out my USB cable was bad. I changed the cable and then it worked.
I am sorry that i bothered you all. The problem was my device is cloned in different places in device manager. It was gone when I tried to update driver for my phone in "Other devices" list, and before i have been updating it in wrong sections. Thank you all.
In my case it was due to already running and hanged adb.exe on another user under my PC. I had two users on my PC, the second user had the adb.exe process hanged even when I tried to end the process. It worked with me after (End Process Tree) from the Task Manager.
Hope this will help someone with multiple users :)
Ahmad
In addition to the above configurations, I had to set deployment target to "Open Select Deployment Target Dialog", run once (choosing my device from the options listed), and from then on Android Studio was able to see my device even after changing the deployment setting back to "USB Device". My SWAG is that since Android Studio uses its own internal cache to find your device, it has to be initialized first.
I was on Samsung S8 and had same problem too. After I installed Samsung Kies, issues was resolved for me, as I believe it had updated the correct driver required for my Samsung S8.
On Windows 7 , the only thing that worked for me is this. Go to Device Manager -> Under Android Phone -> Right Click and select 'enable'
i had to install android studio in 2 machines and ive solved this problem intalling samnsung kies, i use 3 diferents samnsung devices (plus some other of my family and friends) and i dont have to strugle with the drivers, it works for me and i recomend it. hope it helps
For me, this ended up being because I had the wrong SDK level installed (new version of Android Studio installed the SDK for Android 10, whereas I have a device that runs only Android 8.1). While Android Studio would "recognize" the device and display a string in the "devices" menu instead of just saying that no device was connected, installing the right SDK level for my device ended up changing the string to something recognizable (my device's model name) and allowed me to actually run my app over ADB.
I had a big problem with my Samsung S10 Plus as it was not detecded by Android Studio on my Macbook even if I did all what is required to be detected, that is to say:
Enable developer mode (7 taps on Build version in Android settings)
Enable USB debugging
What I did is to start "Android File Transfer" on my Macbook and the magic happened. A popup appeared on my device asking if I want to authorize an USB access to it. I clicked "Yes, always" and now Android Studio can detect my device on my Mac :)
Change the connection method Build-In CD ROM it works for me
On HTC mini one 2, besides enabling the Developer Options, the following worked for me:
Go to More in Wireless & Networks
Mobile Network Sharing
In USB network setting
Select Internet pass-through
I have tried connecting the USB debugger on Samsung Galaxy S2 and Samsung Galaxy Nexus. It still manages to fail on both devices. At the moment I am using Windows XP and I am running out of ideas.
Here is what I tried:
Installed SAMSUNG_USB_DRIVER_FOR_MOBILE_PHONES_1.4.8.0.exe
Searched and tried to install the drivers on Google drives.
Has anyone have this similar problem and could share a solution?
EDIT* Both devices Samsung Galaxy S2 and Samsung Galaxy Nexus are able to connect to the PC but not to the debugger. Drivers installed with different variances even done installing Samsung Kias.
I am adding a bounty tomorrow for 50 reps. I really need to test what I am doing on an actual phone.
You need to download Samsung Kies I know that the software description doesn't mention that it is the correct drivers for developers, but it in fact is.
An old issue used to be:
Use the USB2.0 ports on the back of the PC not the 1.0 front facing port.
I feel you have not installed sdk properly. Reinstall the http://dl.google.com/android/installer_r18-windows.exe, the open the adb and update all the things for the particular sdk you want.
Then verify that you have given the exact location of sdk in eclipse>window>preferences>android
Then restart eclipse.
Even you cant open it then set environment variables. For that add following ;E:\android-sdk-window\platform-tools; in PATH. Then restart windows.
After that try adb devices, adb kill-server command in Command prompt.
You will be able to see your device.
Is there any "ADB interface" devices in your PC's Devices Manager?
If you are using DDMS,Maybe there is a console(cmd.exe) window behind DDMS,you can get some log there.
Did you enable the debug mode on your device? This is not listed in the steps you followed.
Go to Settings -> Applications -> Development -> and set USB debugging.
You can use PdaNet software to connect your device for debugging. I was have the same issue and resolve with using this software. Use the following link to download this software:
http://junefabrics.com/android/download.php
I also have samsung Galaxy SII and i face the Same Problem before some days. But now i am able to get debug the app in My SII.
Please follow the steps and make sure that you follow it completely then only you cna able to get debug in your phone.
First select the Option to Install App from Unknown Sources.
You will find that option in Setting -> Applicatios -> Unknown sources. Select it as yes.
then Select the Option like USB Debugging.
You will find that option in Setting -> Development -> USB debugging. Select it as yes.
Now, Install latest Samsung Kias In your PC. Reboot Your PC, Eclipse and may be Phone also
Now, Try with connecting the Device.
Hope you will get debugging your app in to your phone.
If not then let me know which trouble you get.
Enjoy. :)
My phone has this:
Settings -> SD card & phone storage -> Mass storage only (USB connection mode is mass storage only)
Make sure that this option is NOT checked. If it is u can enable USB debugging and unknown sources and it still wont work.
If you just need to connect to the device for install and debugging you can manually select the driver to use when you plug it in.
Don't let windows search for it, choose I will pick the driver from a list, then select android composite ADB interface. It may warn you that this driver doesn't match, but it works!
I also had many problems to get samsumg galaxy S2 work on my pc. If I remember correctly finally I ended up installing Samsung Kias and installed some drivers through there. Then restarted the computer and never launched kias from then on. My phone is still not visible form command line adb devices, but now I can develop in Eclipse and deploy on the device without any problems.
From time to time I lose connection to the device (E.g. if another device was plugged in). Then I need to restart Eclipse and my device becomes visible again.
Some friends of mine also shared that some other mobile device usb drivers were conflicting with the samsung drivers (it was ZTE if I am not wrong). They uninstalled the ZTE drivers and then got the Samsuung running ok too. Try consider uninstalling all other usb drivers before you try the Galaxy S2.
Have you installed exactly the right SDK version for the phone you're using?
Given that you can access the phone on the PC via KIES, I assume that you have all the correct USB drivers installed.
Ensure that debugging is enabled on your phone. This can be done from the Settings preferences.
Install the Android SDK. Add %ANDROID SDK_INSTALL_PATH%/platform-tools to your path.
If everything is working up to this point, plug in your phone and execute the following from the command line.
adb devices
and you should see your device listed.
Install the Android Developer Tools plugin in Eclipse.
Create/Import your project.
Right click your project and from the context menu, select Debug As --> Android Application
I have had exactly the same problem as you, I even gave up on developing for 2 months because of this. I have just started again and really needed to get this working.
I tried all of the above and pretty much every combination of the above and still failed.
I have just got it working by not doing anything different apart from when I uninstall the old USB driver (add remove progs), the next time I installed AGAIN, I used the SAMSUNG USB Driver for Mobile Phones V1.3.450.0 (an older version than ones suggested on other help forums, I just got it by accident somewhere and thought I'd try it). The next time I plugged the phone in, it did all the usual finding CDC etc. that it always did when it failed...but then.... it asked for the ADB Driver, WOW! I got excited. I just selected Install Automatically and away it went.
I still already had the PDANet thing running and that popped up saying a connection is available. I've not used it though because it wouldn't install on my phone anyway.
FYI, I have these settings on the phone:
USB debugging ON (obviously)
Allow Mock Locations OFF
Unknown Sources ON
I hope this helps.
Dan.
This may not help at all since you have probably tried it already but I had huge issues on two different windows 7 machines getting my s2 to connect for debugging.
I ended up getting one working by plugging in the s2 USB connection, un-installing the drivers for it in the device manager, unplugging the USB connection, un-installing Kies, downloading the most up to date version of Kies, installing that and plugging it back in.
The other one was even more painful, it was a while ago now but I did the same as the above but removed eclipse and the Android SDK as well, installed the latest version of Kies first, the eclipse, then the sdk and made sure all of that was done before I plugged the phone in.
I faced same issue which you faced..
I solved this by this way.
1) Right click on my computer and select Manage
2) Then select Device manager..
3) connect your phone (galaxy s2 in my case)
4) I found one device with named "unknown" in sub option I foung my phone name i9100
5) Then right click on that and select update driver software
6) you will see then this..
Tadaa....Done :)
Hope this will help you also..