score:118

Accepted answer

it is due to android:targetsdkversion="@string/app_name" in your manifiest file.
change it to:

<uses-sdk android:minsdkversion="15" android:targetsdkversion="15"/>

the targetsdkversion should be an integer, but @string/app_name would be a string. i think this causing the error.

edit:
you have to add a default intent-filter in your manifiest file for the activity. then only android can launch the activity. otherwise you will get the below error in your console window.

[2012-02-02 09:17:39 - test] no launcher activity found!
[2012-02-02 09:17:39 - test] the launch will only sync the application package on the device!

add the following to your <activity> tag.

<activity android:name="helloandroid" android:launchmode="standard" android:enabled="true">  
  <intent-filter>
    <action android:name="android.intent.action.main" />
    <category android:name="android.intent.category.launcher" />
  </intent-filter>
</activity>

score:-2

i've changed my android:minsdkversion and android:targetsdkversion to 18 from 21:

uses-sdk android:minsdkversion="18" android:targetsdkversion="18" 

now i can install my app successfully.

score:-1

ionic android emulator error install_failed_older_sdk

so, basically it means that the installation has failed due to having an older sdk version than the targetsdkversion specified in your app (it's a gradle issue). just edit the androidmanifest.xml file and add the following code:

<uses-sdk android:minsdkversion="19" android:targetsdkversion="14"/>

after days looking for the solution, that's it.

works fine for me!

score:-1

if the error "installation error: install_failed_older_sdk" appears, you must change the version of minsdkversion in androidmanifest to the one specified in the android emulator: see settings -> about phone -> android version.

score:0

i am on android studio. i got this error when min/targetsdkversion were set to 17. while looking thro this thread, i tried to change the minsdkversion, voila..problem fixed. go figure.. :(

    android:minsdkversion="17"
    android:targetsdkversion="17" />

score:0

make sure to check your build.gradle and that it doesn't use a newer sdk version than what is installed on your avd. that's only if you use android studio though.

score:0

if you are totally new like me, you must install the minimum sdk at first. check the link.

this worked out perfectly for me:

same problem other post with a good solution

regards,

khaled.

score:0

my solution was to change the run configurations module drop-down list from wearable to android. (this error happened to me when i tried running google's i/o sched open-source app.) it would automatically pop up the configurations every time i tried to run until i changed the module to android.

you can access the configurations by going to run -> edit configurations... -> general tab -> module: [drop-down-list-here]

score:0

i found that making the recommended change in the manifest didn't solve my problem.

the fix was found in the gradlescripts folder, in the build.gradle file for the module:app.

inside this file (build.gradle) the following line was modified. minsdkversion 22 i changed this '22' value to '19' for my particular phone and the build completed without error.

score:0

mate, my advice is to change virtual device. download "genimotion" application, its easy to use and there are a lot of any devices you need

score:0

go in your project's build.cradle file and add

defaultconfig {
    minsdkversion versions.minsdk

}`

this makes it that your application conforms to the minimum sdk your device is running.

score:1

in my case i edited a project having this in the androidmanifest.xml file, and which was ginving me the above error, at runtime:

<uses-sdk
    android:minsdkversion="17"
    android:targetsdkversion="17" />

what i did just, was to change minsdkversion="17", to minsdkversion="16". my resulting tag was:

<uses-sdk
    android:minsdkversion="16"
    android:targetsdkversion="17" />

now i'm not getting the error anymore..

hope this helps

score:1

received the same error , the problem was difference in the version of android sdk which avd was using and the version in androidmanifest file. i could solve it by correcting the

android:minsdkversion="16"

to match with avd.

score:1

you will see the same error if you are trying to install an apk that was built using

compilesdkversion "android-l"

even for devices running the final version of android 5.0. simply change this to

compilesdkversion 21

score:1

fix for new android 6.0 marshmallow fixed my issue when i updated to api 23 (android 6.0 marshmallow) by updating the build tools version to 23.0.0 as follows:

android {
    buildtoolsversion '23.0.0'
...

and went to file > project structure , chose properties tab then updated the compile sdk version to "api 23: android 5.x (mnc)" and the build tools version to "23.0.0"

score:4

i tried all the responses described here but my solution was changing inside my build.gradle file minsdkversion from 8 to 9 because some libraries in my project can´t work with api 8, that´s was the reason for the message install_failed_older_sdk:

apply plugin: 'com.android.application'

    android {
        compilesdkversion 22
        buildtoolsversion "22.0.1"

        defaultconfig {
            applicationid "com.tuna.hello.androidstudioapplication"
            minsdkversion 9
            targetsdkversion 22
            versioncode 1
            versionname "1.0"
        }
...
...
...

score:14

i am using android studio 0.8.1. i have a project's gradle file like below:

android {
    compilesdkversion 19
    buildtoolsversion "20.0.0"

    defaultconfig {
        applicationid "com.omersonmez.widgets.hotspot"
        minsdkversion 15
        targetsdkversion 19
        versioncode 1
        versionname "1.0"
    }
    buildtypes {
        release {
            runproguard false
            proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

my emulator was android 4.0. so i modified my emulator and made api level 4.0.3(apilevel 15). it worked.

score:16

this error occurs when the sdk-version installed on your device (real or virtual device) is smaller than android:minsdkversion in your android manifest.

you either have to decrease your android:minsdkversion or you have to specify a higher api-version for your avd.

keep in mind, that it is not always trivial to decrease android:minsdkversion as you have to make sure, your app cares about the actual installed api and uses the correct methods:

asynctask<string, object, string> task = new asynctask<string, object, string>() {
    @override
    protected boolean doinbackground(string... params) {
        if (params == null) return "";
        stringbuilder b = new stringbuilder();
        for (string p : params) {
             b.append(p);
        }
        return b.tostring();
    }
};
if (build.version.sdk_int >= build.version_codes.honeycomb) {
    task.executeonexecutor(asynctask.thread_pool_executor,"hello", " ", "world!");
} else {
    task.execute("hello", " ", "world!");
}

using the android-support-library and/or libraries like actionbar-sherlock will help you dealing especially with widgets of older versions.

score:28

this means the version of android of your avd is older than the version being used to compile the code


Related Query

More Query from same tag