2

I am a beginner to Android Development. I created a Hello World Application in Android Studio. I tried using my phone through ADB to debug my app since I have heard the Android emulators are painfully slow. However, I had received an error when it was trying to install into my phone:

Failure [INSTALL_FAILED_OLDER_SDK]

My phone is the Samsung Galaxy S4 (M919) with my min API level set at 15, so I thought that can't be right since I am running Kit Kat. Could Cyanogenmod be a problem as that is what I am running?

I searched and found that many others have had this problem, but I still have not found a solution (maybe due to my incompetence and just didn't understand it, but at least I don't think it is).

Thanks in advance

EDIT - manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.brinith.helloworld" >

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
fabian
  • 80,457
  • 12
  • 86
  • 114
dfgsdfg
  • 39
  • 1
  • 3
  • 1
    possible duplicate of [Installation error: INSTALL\_FAILED\_OLDER\_SDK](http://stackoverflow.com/questions/9093709/installation-error-install-failed-older-sdk) –  Jul 02 '14 at 01:13
  • Please post your manifest – laalto Jul 02 '14 at 08:36
  • Here: As you can see, I literally just started this project and didn't really go any further before I got my device up and running. Thus, the manifest was strictly the generated code. I edited it into my OP. – dfgsdfg Jul 02 '14 at 14:40
  • 1
    When I tried to add a minsdkversion as well as a target version, the gradle build of Android L appearently is constantly overwritten those values. Which is probably why I cannot use my phone. How do I prevent these values from being overwritten? – dfgsdfg Jul 02 '14 at 17:08
  • 2
    I'm having the same problem. Latest version of Android Studio. The answers given in http://stackoverflow.com/questions/9093709/installation-error-install-failed-older-sdk do not work, so not a duplicate. – Martijn Jul 05 '14 at 17:06

1 Answers1

0

check your build.gradle file and see that you are using the correct sdk version. I had the same problem because the targetSdkVersion wasn't correct.

Bad: defaultConfig { applicationId "com.software.myapplication" minSdkVersion 19 targetSdkVersion 'L' versionCode 1 versionName "1.0" }

Correct: defaultConfig { applicationId "com.software.myapplication" minSdkVersion 19 targetSdkVersion 19 versionCode 1 versionName "1.0" }

Rashid
  • 492
  • 1
  • 8
  • 19