I have just started writing my first android app. Initially I started with Eclipse plus ADT plugin and launching the app on my phone worked fine. I then switched to Android studio and whilst I prefer the IDE I cannot, for the life of me, get the app to launch on my phone any more.
I am using a Google Nexus 4 with android version 4.4.4 (KitKat) API version 19.
I set up my project to have a minimum SDK version of 15 (Ice Cream Sandwich) and Android Studio automatically set my target SDK to 'L' and uses the 'android-L' compiler.
The error I receive when trying to launch my app at these settings is:
pkg: /data/local/tmp/com.example.me142.socialprogrammingapp Failure[INSTALL_FAILED_OLDER_SDK]
I have tried changing the minSDK and targetSDK in my build.gradle file, this has made no difference.
I have also tried lowering the compiledSDKVersion but this leads to another error:
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'.
In my styles.xml file.
For reference, here is my build.gradle code:
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-L'
buildToolsVersion '20.0.0'
defaultConfig {
applicationId "com.example.me142.socialprogrammingapp"
minSdkVersion 15
targetSdkVersion 'L'
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
I would also like to mention that the only modifications I have made (other than playing around with the build.gradle) since creating the new project in Android Studio is add some buttons to the main activity, which, so far, do nothing when clicked.
If anyone can help then it would be much appreciated and if you need any more info then just ask.
Thanks