3

I am in the process of building and debugging an app on my phone and I keep getting the error "Failure [INSTALL_FAILED_OLDER_SDK]" when I try to push a test build to my phone. It by default set the target SDK to L but I set the minimum SDK level to 9 to cover the most devices. The device I'm trying to load the app on is a Galaxy S3 running 4.4.4 (which I know is API 19).

Here is the defaultConfig from my build.gradle

    defaultConfig {
        applicationId "com.tg94.intcalc"
        minSdkVersion 9
        targetSdkVersion "L"
        versionCode 1
        versionName "1.0"
    {

When I go and look at my AndroidManifest.xml though, this is what it shows

    <uses-sdk
        android:minSdkVersion="L"
        android:targetSdkVersion="L" />

When I try to edit this (I tried editing in Visual Studio 2013, Notepad++ and just plan Windows Notepad), I noticed the android:minSdkVersion always changes back to L even though I changed it and saved it to API level 9. Is there any suggestions I should try to fix this?

EDIT: Just updated Android Studio to 0.8.2 but the problem still presists

ThatGuy
  • 31
  • 3

1 Answers1

2

Currently, applications that target the L developer preview cannot be installed on devices that do not have it -- the SDK forces minSdkVersion to L when targetSdkVersion is L. This is the associated issue in the AOSP tracker.

Although there are some hacks around this limitation, such as described here, they basically involve fooling the SDK into thinking L is not a developer preview.

If you're developing for L, then you should use an L device (or emulator) to test the app. Otherwise, use targetSdkVersion 19 instead.

matiash
  • 54,791
  • 16
  • 125
  • 154
  • Thank you. I downloaded and went down to API 19 and was able to get it to work – ThatGuy Jul 10 '14 at 04:13
  • If you follow the link in matiash's Answer (a great link), you'll find this: "NOTE... The Android team has made it pretty clear that *Gradle is the future* from here on out, so if you're still on Eclipse then I don't know what to tell you." Just FYI, though I guess it's just an opinion. All these AS quirks have made me wonder if I should change to Eclipse. This blurb makes me want to stay with AS thru thick and thin. So far every AS problem has been solvable. – DSlomer64 Jul 12 '14 at 14:43