1

I am newbie in Android development. Want to know about something related to my few queries : Is it possible to built an app in 2.1 and install in higher like 2.2 or 2.3 ? OR is it like the built version should be higher than the device OS where have to install the app.

Can anyone help me figure out with this query ?

EDIT :
Friends and Expoerts with this info can you help me why my app built on 2.1 and trying to install on 2.2 gets "Parse Error" - Freinds with this info, can you help me with this problem https://stackoverflow.com/questions/5977258/android-parse-error-while-reinstalling

Please Any help is highly appreciated.

asked May 12, 2011 at 15:51

2 Answers 2

3

Yes to my knowledge every version of android is backwards compatible. So an app built for 2.1 will run on 2.2+. But you won't be able to use any new API features introduced in 2.2 or 2.3 even though the device supports it.

answered May 12, 2011 at 15:53
Sign up to request clarification or add additional context in comments.

8 Comments

Thanks Tim, So 2.1Built will run on 2.2/2.3 but 2.3Built wont run on 2.2 Though All functionality are used based on 2.1 compatibility only.
Although it is planned and intended that "every version of android is backwards compatible", beware that an app that functions perfectly well in 1.5 or 1.6 may fall foul of bug fixes, security "enhancements" etc on later revisions (which aren't backported). Write once, test everywhere...
They should have named minSdkVersion something like minRequiredRuntimeLevel or minRuntimeAPI. Think of it like the Java JDK and JRE environments
@NickT, where do we add/assign those values minSdkVersions, minRequiredRuntimeLevel, minRuntimeAPI
Assuming you haven't changed the name of the apk manually what you describe (i.e build with a 2.1 target) should work on a real 2.2 device. I would set minSdkVersion to 7 (which is 2.1). I'd check that there were no entries for maxSdkVersion or targetSdkVersion in the manifest. I'd also try uninstalling the application from the device using the menu option Settings/Applications /Manage Applications. Then I'd try again to install the 2.1 build. If that doesn't work, then I'm stumped
|
1

Yes. That's exactly why you specify the minimum API version. That's what it means. In fact, the Android SDK will prevent you automatically (it will not compile) from using any features that are available in some of the higher versions, but not in the minimum API version you specified. This way you don't have to worry about any of this stuff.

answered May 12, 2011 at 16:00

5 Comments

Phonon, in my Manifest file, I had mentioned minSDK=3 . Earlier the app was built in 2.3 but when I tred to compile in 2.1 I got couple of errors for using String.isEmpty(). Is minimumAPI mentionedi nmanifest onyl or somewhere else. And then I guess we should have installeld all later versions of sdk - I mean if min API is 3, then from 3 to 10 (current) all SDK API should be installed on our system ???
Exactly. The Stinrg.Empty() method was introduced in Android API 9, therefore the compiler is failing when you're trying to use a method only compatible with Android 2.3 and higher.
And yes, you only specify it in the Android Manifest.
Phonon, then with minSDK=3, why should my application using String.isEmpty() compile ? API 9 contains this mthod and not 3. Should I have installed API 3 in my system or how does this work out ?
In order for it to compile, it needs to make sure it can work on any system specified. String.Empty() works on API's 9+. Therefore, because your minimum API is set to 3, and this cannot work on 3,4,5,6,7 and 8, it will not let you compile. If you set minimum API to 9, it will, but the application, of course, will not support Android 2.2 and earlier.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.