develop1 develop1 - 1 year ago 740
Android Question

Android error No, minSdk(API 19) > deviceSdk(API 1)

I have just set up android studio and am trying to compile my first project. The project gets compiled but when the 'Choose Device' menu opens the device and state is shown as [OFFLINE] and compatible gives message Android error message Android error

No, minSdk(API 19) > deviceSdk(API 1)
What does this mean? How can I solve it?

my build.grandle file looks like this

apply plugin: ''

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
applicationId "com.yaron.myapplication"
minSdkVersion 19
targetSdkVersion 21
versionCode 1
versionName "1.0"
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), ''

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile ''

Answer Source

There are a few things to check.

if you go to the terminal window in Android Studio and cd to the path where your sdk platform tools are installed (something like C:\Android\SDK\platform-tools ) and run the following command

adb devices

Do you have a device listed? If not then you don't have the device setup properly, or the correct drivers.

On the phone make sure that you have developer options enabled (go to settings->about phone and click on the Build Number 7 times or so)

Once you have enabled that go into the develop options under settings and make sure USB debugging is enabled.

If adb devices said "no permission" for the device you are connecting, make sure to connect it as MTP device first. This will implicitly prompt you to import the computer's fingerprint and allow future connections for USB debugging as well.