Vaguely about Android API and compatibility

I bought HTC Incredible and dived into the android world! Just to fully immerse yourself in the API level and backward compatibility.

My device works under OS 2.1, but I know that most of the devices work there 1.5 or 1.6; and soon OS 2.2 will work on new devices. The SDK has undergone such huge changes that even the constants have been renamed (for example, from VIEW_ACTION to ACTION_VIEW). Methods have been added and removed (onPause replaces the previous call, etc.).

So, if I want to write an application that will work from version 1.6+, does this mean that I need to install and write my code using API 1.6? then check on later versions? Or can I write using the 2.1 SDK and just set the minSDK level and not use the “new” functions?

I have never worked with an SDK that changes SO a lot from release to release! So I'm not sure what to do ....

I read an article on the Android Development site (and this post about stack overflow that links to it: Should I reinstall an outdated Android application using SDK 2.1? ), But I still didn't understand very well. Any help would be appreciated

+3
source share
2 answers

SDK , ( VIEW_ACTION ACTION_VIEW). (onPause ..).

- , - . Android 1.0, , , , API, SDK .

, 1.6+, API 1.6; ? , 2.1 SDK minSDK "" ?

, . , .

  • Android.
  • minSdkVersion , , API,
  • targetSdkVersion , , "" API, Android , Android ( , "" API)
  • API, minSdkVersion, API- ,
  • , , , API.
+5

SDK minSDK , . , - , minSDK. SDK .

<uses-sdk minSDK="4" targetSDK="8"/>

, 2.2, SDK, , , 1.6. , xml , ..

+3

Source: https://habr.com/ru/post/1748149/


All Articles