Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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: 'com.android.application'  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'), 'proguard-rules.pro'         }     } }  dependencies {     compile fileTree(dir: 'libs', include: ['*.jar'])     compile 'com.android.support:appcompat-v7:22.0.0' } 
like image 266
develop1 Avatar asked Jun 04 '15 00:06

develop1


People also ask

What is minSdk version in Android?

android:minSdkVersion — Specifies the minimum API Level on which the application is able to run. The default value is "1".

Where is the API Level of an Android app specified?

Each app specifies a targetSdkVersion (also known as the target API level) in the manifest file. The target API level indicates how your app is meant to run on different Android versions.

What is minimum API Level in Android studio?

When you upload an APK, it must meet Google Play's target API level requirements. New apps must target Android 12 (API level 31) or higher; except for Wear OS apps, which must target Android 11 (API level 30) or higher.

What is target sdk in Android?

The Target Android Version (also known as targetSdkVersion ) is the API level of the Android device where the app expects to run. Android uses this setting to determine whether to enable any compatibility behaviors – this ensures that your app continues to work the way you expect.


1 Answers

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.

like image 74
GR Envoy Avatar answered Sep 29 '22 05:09

GR Envoy