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
How to Set Google Map Fragment Inside Scroll View
Android: Running a Background Task Using Alarmmanager
Android: Using Objectanimator to Translate a View with Fractional Values of the View's Dimension
How to Change the Background Color Around a Dialogfragment
How to Pop Fragment Off Backstack
How to Show Progress Dialog in Android
Why Is Android Webview Refusing User Input
If I Call Getmeasuredwidth() or Getwidth() for Layout in Onresume They Return 0
Register to Be Default App for Custom File Type
Notifications Fail to Display in Android Oreo (API 26)
How to Correctly Start Activity from Postexecute in Android
Add Google Play Services to Eclipse Project
Error Non-Default Constructors in Fragments
How to Use Startactivityforresult() for Email Intent
Packaging Android Resource Files Within a Distributable Jar File
Exif Orientation Tag Value Always 0 for Image Taken with Portrait Camera App Android