Thursday, 25 July 2013

Get rid off Failure [INSTALL_FAILED_OLDER_SDK] by gradle

It means your phone/emulator uses older sdk than project.
To fix go to file build.gradle and change min sdk to lower.

 buildscript {  
   repositories {  
     mavenCentral()  
   }  
   dependencies {  
     classpath 'com.android.tools.build:gradle:0.4'  
   }  
 }  
 apply plugin: 'android'  
 dependencies {  
   compile files('libs/android-support-v4.jar')  
 }  
 android {  
   compileSdkVersion 17  
   buildToolsVersion "17.0.0"  
   defaultConfig {  
     minSdkVersion 15  
     targetSdkVersion 17  
   }  
 }