Download api 24 android






















Before setting these attributes, make sure that you understand Google Play filters. Lets you express an application's compatibility with one or more versions of the Android platform, by means of an API Level integer.

The API Level is always a single integer. You cannot derive the API Level from its associated Android version number for example, it is not the same as the major version or the sum of the major and minor versions. Also read the document about Versioning Your Applications.

Caution: If you do not declare this attribute, the system assumes a default value of "1", which indicates that your application is compatible with all versions of Android. If your application is not compatible with all versions for instance, it uses APIs introduced in API Level 3 and you have not declared the proper minSdkVersion , then when installed on a system with an API Level less than 3, the application will crash during runtime when attempting to access the unavailable APIs.

This attribute informs the system that you have tested against the target version and the system should not enable any compatibility behaviors to maintain your app's forward-compatibility with the target version.

The application is still able to run on older versions down to minSdkVersion. As Android evolves with each new version, some behaviors and even appearances might change. However, if the API level of the platform is higher than the version declared by your app's targetSdkVersion , the system may enable compatibility behaviors to ensure that your app continues to work the way you expect.

You can disable such compatibility behaviors by specifying targetSdkVersion to match the API level of the platform on which it's running. For example, setting this value to "11" or higher allows the system to apply a new default theme Holo to your app when running on Android 3. There are many compatibility behaviors that the system may enable based on the value you set for this attribute. Several of these behaviors are described by the corresponding platform versions in the Build.

To maintain your application along with each Android release, you should increase the value of this attribute to match the latest API level, then thoroughly test your application on the corresponding platform version. In Android 1. In either case, if the application's maxSdkVersion attribute is lower than the API Level used by the system itself, then the system will not allow the application to be installed.

In the case of re-validation after system update, this effectively removes your application from the device. To illustrate how this attribute can affect your application after system updates, consider the following example:. A user whose device is running Android 1. After a few weeks, the user receives an over-the-air system update to Android 2.

After the update is installed, the system checks the application's maxSdkVersion and successfully re-validates it. The application functions as normal. However, some time later, the device receives another system update, this time to Android 2. After the update, the system can no longer re-validate the application because the system's own API Level 6 is now higher than the maximum supported by the application 5. The system prevents the application from being visible to the user, in effect removing it from the device.

Warning: Declaring this attribute is not recommended. First, there is no need to set the attribute as means of blocking deployment of your application onto new versions of the Android platform as they are released.

By design, new versions of the platform are fully backward-compatible. Your application should work properly on new versions, provided it uses only standard APIs and follows development best practices. Second, note that in some cases, declaring the attribute can result in your application being removed from users' devices after a system update to a higher API Level.

Most devices on which your application is likely to be installed will receive periodic system updates over the air, so you should consider their effect on your application before setting this attribute.

The Android platform provides a framework API that applications can use to interact with the underlying Android system. The framework API consists of:.

Each successive version of the Android platform can include updates to the Android application framework API that it delivers. That is, most changes in the API are additive and introduce new or replacement functionality. As parts of the API are upgraded, the older replaced parts are deprecated but are not removed, so that existing applications can still use them.

In a very small number of cases, parts of the API may be modified or removed, although typically such changes are only needed to ensure API robustness and application or system security. All other API parts from earlier revisions are carried forward without modification. For information about the relative numbers of devices that are running each version, see the Platform Versions dashboards page.

The API Level identifier serves a key role in ensuring the best possible experience for users and application developers: It lets the Android platform describe the maximum framework API revision that it supports It lets applications describe the framework API revision that they require It lets the system negotiate the installation of applications on the user's device, such that version-incompatible applications are not installed. The element offers three key attributes:.

The value of android:minSdkVersion would be the integer corresponding to the API Level of the earliest version of the Android platform under which the application can run.

The system allows the installation to begin only if these conditions are met:. If the application were to be somehow installed on a platform with a lower API Level, then it would crash at run-time when it tried to access APIs that don't exist. The system prevents such an outcome by not allowing the application to be installed if the lowest API Level it requires is higher than that of the platform version on the target device.

For example, the android. If an application uses that API, it must declare a android:minSdkVersion attribute with a value of "3". The application will then be installable on platforms such as Android 1. The sections below provide information related to API level that you should consider when developing your application. The application should be able to run on all later versions of the Android platform, except in isolated cases where the application uses a part of the API that is later removed for some reason.

Forward compatibility is important because many Android-powered devices receive over-the-air OTA system updates. The user may install your application and use it successfully, then later receive an OTA update to a new version of the Android platform. Once the update is installed, your application will run in a new run-time version of the environment, but one that has the API and system capabilities that your application depends on.

In some cases, changes below the API, such those in the underlying system itself, may affect your application when it is run in the new environment. For that reason it's important for you, as the application developer, to understand how the application will look and behave in each system environment. To help you test your application on various versions of the Android platform, the Android SDK includes multiple platforms that you can download. Each platform includes a compatible system image that you can run in an AVD, to test your application.

Android applications are not necessarily backward compatible with versions of the Android platform older than the version against which they were compiled. Each new version of the Android platform can include new framework APIs, such as those that give applications access to new platform capabilities or replace existing API parts.

The new APIs are accessible to applications when running on the new platform and, as mentioned above, also when running on later versions of the platform, as specified by API Level.

Conversely, because earlier versions of the platform do not include the new APIs, applications that use the new APIs are unable to run on those platforms. Although it's unlikely that an Android-powered device would be downgraded to a previous version of the platform, it's important to realize that there are likely to be many devices in the field that run earlier versions of the platform. Even among devices that receive OTA updates, some might lag and might not receive an update for a significant amount of time.

Jay says:. May 25, at am. Anupam says:. May 25, at pm. Alex P. December 18, at pm. Saim Anwer says:. December 6, at pm. Shani Maurya says:. September 30, at am. December 5, at pm. Akash says:. October 14, at pm. Abhilash Karanth says:. November 8, at am. October 26, at am. Dheeraj Vaid says:. August 22, at am. Sri Krishna says:. March 26, at am. June 17, at pm. June 7, at am. Vijay says:. May 9, at am. Sandeep Padhi says:. April 6, at am. Rishav says:. February 22, at am.

Gunjan Sharma says:. January 2, at pm. The following sections explain how to use the SDK Manager to prepare your development environment for the API levels you want to target, followed by detailed explanations of how to configure Target Framework , Minimum Android version , and Target Android version settings in Xamarin. This setting specifies what APIs your app expects to use when it runs, but it has no effect on which APIs are actually available to your app when it is installed.

As a result, changing the Target Framework setting does not change runtime behavior. The Target Framework identifies which library versions your application is linked against — this setting determines which APIs you can use in your app. For example, if you want to use the NotificationBuilder.

SetCategory method that was introduced in Android 5. We recommend that you always compile with the latest available Target Framework version. Doing so provides you with helpful warning messages for any deprecated APIs that might be called by your code. Using the latest Target Framework version is especially important when you use the latest support library releases — each library expects your app to be compiled at that support library's minimum API level or greater.

To access the Target Framework setting in Visual Studio, open the project properties in Solution Explorer and select the Application page:. To access the Target Framework setting in Visual Studio for Mac, right-click the project name and select Options ; this opens the Project Options dialog.

Set the Target Framework by selecting an API level in the drop-down menu to the right of Target framework as shown above. By default, an app can only be installed on devices matching the Target Framework setting or higher; if the Minimum Android version setting is lower than the Target Framework setting, your app can also run on earlier versions of Android.

For example, if you set the Target Framework to Android 7. Although your app may successfully build and install on this range of platforms, this does not guarantee that it will successfully run on all of these platforms. For example, if your app is installed on Android 5. Therefore, your code must ensure — at runtime — that it calls only those APIs that are supported by the Android device that it is running on. In other words, your code must include explicit runtime checks to ensure that your app uses newer APIs only on devices that are recent enough to support them.

Runtime Checks for Android Versions , later in this guide, explains how to add these runtime checks to your code. In the drop-down menu under Minimum Android version you can select the Minimum Android version for your application:. To access the Minimum Android version in Visual Studio for Mac, right-click the project name and select Options ; this opens the Project Options dialog.

Using the drop-down menu to the right of Minimum Android version , you can set the Minimum Android version for your application:. If you select Automatic — use target framework version , the Minimum Android version will be the same as the Target Framework setting.

Android uses this setting to determine whether to enable any compatibility behaviors — this ensures that your app continues to work the way you expect. Android uses the Target Android version setting of your app to figure out which behavior changes can be applied to your app without breaking it this is how Android provides forward compatibility.

The Target Framework and the Target Android version, while having very similar names, are not the same thing. Android for use at compile time , while the Target Android version communicates target API level information to Android for use at run time when the app is installed and running on a device. To access this setting in Visual Studio, open the project properties in Solution Explorer and select the Android Manifest page.

In the drop-down menu under Target Android version you can select the Target Android version for your application:. We recommend that you explicitly set the Target Android version to the latest version of Android that you use to test your app. Ideally, it should be set to the latest Android SDK version — this allows you to use new APIs prior to working through the behavior changes.

The system version is 4. For more information, see the Android 4. Initial release. For details about the platform changes, see the Jelly Bean overview and Android 4.

Note: This system image includes support for emulator hardware graphics acceleration when used with SDK Tools r17 or higher.

Improvements to the platform's rendering library to support the visual layout editor in the ADT Eclipse plugin. This revision allows for more drawing features in ADT and fixes several bugs in the previous rendering library. It also unlocks several editor features that were added in ADT Fixes an issue with the visual layout editor rendering library that prevented Android 3.

Android Studio. Download What's new User guide Preview. Features overview Release notes. Android Developers. This is required to compile your app for that version. Several System Image packages. At least one of these is required to run that version on the Android Emulator. The Sources for Android package.

This includes the source files for the platform. Android Studio may show lines of code from these files while you debug your app.



0コメント

  • 1000 / 1000