Choosing an SDK

On the Target Android Devices screen, you have to select the device types and the corresponding minimum version of Android required to run your app. The Android Software Development Kit (SDK) provides tools required to build your Android app irrespective of your language of choice.

Each new version of the SDK comes with a new set of features to help developers provide more awesome features in their apps. The difficulty, though, is Android runs on a very wide range of devices, some of which do not have the capabilities to support the latest versions of Android. This puts developers in a tough position of choosing between implementing great new features or supporting a wider range of devices. 

Android tries to make this decision easier by providing the following:

  • Data on the percentage of devices using specific SDKs to help developers make an informed choice. To view this data in Android Studio, click Help me choose under the minimum SDK dropdown. This will show you a list of currently supported Android SDK versions with their supported features, and the percentage of Android devices your app will support if you select that as your minimum SDK:

You can check out an up-to-date and more detailed version of that data on the Android developer dashboard (https://developer.android.com/about/dashboards/).

  • Android also provides support libraries to help with backward compatibility of certain new features added in newer SDK versions. Each support library is backward compatible to a specific API Level. Support libraries are usually named based on the API level with which they're backward compatible with. An example is appcompat-v7, which provides backward compatibility to API Level 7.

We'll discuss SDK versions further in a later section. For now, you can select API 15: Android 4.0.3 (IceCreamSandwich) and click Next:

The next screen is the Add an Activity to Mobile screen. This is where you select your default activity. Android Studio gives a number of options, from an activity with a blank screen to an activity with a login screen. For now, select the Basic Activity option and click Next:

On the next screen, enter the name and title of the activity, and the name of the activity layout. Then, click Finish:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset