Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

If an app is written for Android 2.3 will it run on 2.1?

share|improve this question
1  
possibly belongs on SO –  Daniel May 11 '11 at 18:47
    
I Did not understand... SO? –  Lordareon May 11 '11 at 18:50
    
@Lordareon: Stackoverflow.com. Development questions are off-topic here. Please see the FAQ for more information. –  eldarerathis May 11 '11 at 19:01
    
I have rewritten the question slightly, it's fine to stay here :) –  Matthew Read May 11 '11 at 19:02
    
@Matthew: This question would be fine, I agree. I'm not sure if the OP's question was the same as this one, though. By "compile an app for 2.3" he could mean "If I set the minSDK to 2.3 will it run on 2.1?" or "If I set the targetSDK to 2.3 will it run on 2.1?" Those have different answers, and would be both dev related IMHO. Your edited version is definitely more generic and could be an end-user question, which I totally agree makes it valid here. I'm just personally not sure exactly what the OP meant and if this version is equivalent. –  eldarerathis May 11 '11 at 19:14
show 2 more comments

2 Answers 2

It depends. If an application uses features present in Android 2.3, then it will not work on 2.2 or lower. If it only uses features present in older versions, then it will work on those older versions.

For example, an app written for 2.1 (i.e., an app that only uses features from 2.1 or lower) will work on 2.1, 2.2, 2.3, 3.0, and 3.1 (and any future versions, unless Google changes how things work).

share|improve this answer
    
The only caveat to this being sometimes the app will technically "work" because it runs without error, but if an app is not optimized for use across different devices (like when an app designed for a phone is run on a tablet) scaling issues and other subtle differences make the app less usable or sometimes completely unusable. This is more of a problem with the developer not coding their app properly, though, not an underlying compatibility issue between versions of Android. –  newuser May 11 '11 at 21:11
2  
Almost correct: Some features are optional and an application that uses them may still work on a OS version which does not have the feature. For example "install to SD card". You can target 2.2 with your application and use that feature but still declare it to be working on e.g 2.1 and up. The application will work on 2.1 in this case, but without the install to SD feature. –  user4188 May 11 '11 at 23:45
add comment

Internally Android uses so called API levels to distinguish between the various Android versions. An app records two (actually three, but this doesn't matter here) API levels within it's manifest:

  • minSdkVersion
  • targetSdkVersion

These levels can differ when, for example, the App uses a feature of a higher API level only optionally. E.g. the access to the front facing camera came with 2.3.3. If the App runs on a older version (API level) it can only access the rear camera. But the app will be installable and runnable.

So yes, if a app is written for a higher Android version it could run on a lower, but only if the app developer took care of that.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.