Installation Error: Install_Failed_Older_Sdk

Installation error: INSTALL_FAILED_OLDER_SDK

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>

Failure [INSTALL_FAILED_OLDER_SDK] Android-L

Recently there was a post here regarding the L SDK's incompatibility
with prior versions of Android. I've been digging in AOSP repositories
for quite a few hours now, and determined that the tools behave this
way because they are designed to treat preview platforms differently.
If you compile against a preview SDK (android-L), the build tools will
lock minSdkVersion and targetSdkVersion to that same API level. This
results in the produced application being unable to be installed on
devices running older releases of Android, even if your application
isn't doing anything specific to L. To make matters worse, the new
support libs (CardView, RecyclerView, Palette, etc.) are also locked
into the L API level, even though--according to their repository
names--they should work on API level 7 just fine (and they do!).

See my Reddit post about this here, with a workaround.

Failure [INSTALL_FAILED_OLDER_SDK] Android Studio

Unless you know you want to be using the Android L developer preview with your application, do not target and compile with it. It is still very much a preview release, and it appears as though applications targeting and compiling for the preview cause this error with any non-L device.

Update these lines in your build.gradle to stick with the latest stable release (Android 4.4, API 19):

android {
compileSdkVersion 19

defaultConfig {
targetSdkVersion 19
}
}


Related Topics



Leave a reply



Submit