2

I recently downloaded the Android API 21 for use in Android Studio BETA.

I set the minimum required SDK version for my app to be 21. After doing so I am not able to run my app on my device(MOTO G Android 4.4 KITKAT) as it gives the following message

Waiting for device.
Target device: motorola-xt1033-TA93305SP4
Uploading file
local path: C:\Users\GeeBee\AndroidStudioProjects\testApp8\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/com.example.geebee.testapp8
Installing com.example.geebee.testapp8
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.geebee.testapp8"
WARNING: linker: app_process has text relocations. This is wasting memory and is a security risk.  Please fix.
WARNING: linker: app_process has text relocations. This is wasting memory and is a security risk.  Please fix.
pkg: /data/local/tmp/com.example.geebee.testapp8
Failure [INSTALL_FAILED_OLDER_SDK]

Following are the contents of my build.gradle file

apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.0.0"

defaultConfig {
    applicationId "com.example.geebee.testapp8"
    minSdkVersion 21
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

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

As soon as I change the API version to a lower level, it deploys fine. What could be the problem with API 21 ? Please help me out here guys...

1 Answer 1

0

You are setting minSdkVersion to 21. You are effectively telling Android that your app can not run on any SDK prior to version 21. You should set the minSdkVersion to something lower, like 19 (4.4 Kitkat).

1
  • Actually I want to use API 21 only in order to use the Material Look App Theme. I wonder why can't I use API 21 ? Where is the problem with API 21. I already mentioned that app works fine on all other API versions. Please help... Nov 14, 2014 at 18:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.