14

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)

enter image description here

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
suiwenfeng
  • 1,865
  • 1
  • 25
  • 32

15 Answers15

13

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".

Image of recognized device

Community
  • 1
  • 1
jetimms
  • 417
  • 1
  • 5
  • 23
5

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.

Dav
  • 51
  • 1
  • 2
4

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.

Jey10
  • 681
  • 10
  • 30
  • Thanks, but why API level = 1 is more important. and the device is offline. I will publish the right answer. – suiwenfeng Oct 30 '15 at 02:34
4

I was also having the exact problem. Here are the steps to resolve it.

  1. 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\

  2. From terminal or command Prompt run adb kill-server

  3. Now just hit the play button to start the app.

vincent mathew
  • 4,278
  • 3
  • 27
  • 34
2

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.

Matt.Harris
  • 747
  • 6
  • 9
2

Please do the following Click File>ProjectStructure> Select Flavour from the panel set Min Sdk version 1

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.

Dedan
  • 125
  • 9
1

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.

xinxin yao
  • 31
  • 3
1

Usually whenever I connect the android device for usb debugging, the device will prompt me asking for providing permission to enable usb debugging.

enter image description here

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

chank
  • 3,546
  • 1
  • 14
  • 22
0

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.

Rabin Pantha
  • 941
  • 9
  • 19
0

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.

Gangnus
  • 24,044
  • 16
  • 90
  • 149
0

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.

Mark Balfour
  • 23
  • 1
  • 3
0

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.

Earl Allen
  • 29
  • 5
0

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.

Manolo
  • 24,020
  • 20
  • 85
  • 130
0
  1. Let your device be connected
  2. Disable USB debugging
  3. Enable USB debugging
  4. Run config choose the device.