Declare a Java interface that exposes the higher-level functionality you want to perform that is only available in current versions of Play services. If you need to call newer APIs made available with 10.2.0, you will have to create a compatibility library for the newer API calls so that they are only built into the version of the application that can use them: This will work fine if only APIs are called that are available in the 10.0.0 library. In the above situation, there are two product flavors being built against two different versions of the Google Play services client libraries. For example, in your adle, define two different product flavors, with two different compile dependencies for the components of Play Services you’re using: productFlavors First, define build flavors for legacy and newer versions of your app. You can accomplish this with build variants in Gradle. Build multiple APKs to support devices with an API level less than 14.Īlong with some configuration and code management, you can build multiple APKs that support different minimum API levels, with different versions of Google Play services. If your app still has a significant number of users on older devices, you can use multiple APK support in Google Play to deliver an APK that uses Google Play services 10.0.0. We believe that many of these old devices are not actively being used. You can read more about the current distribution of Android devices. However, they will still be able to download and use the most recently published version of the app that does target their device.Ī very small percentage of all Android devices are using API levels less than 14. If you update your app in this way and publish it to the Play Store, users of devices with less than that level of support will not be able to see or download the update. To discontinue support for API levels that will no longer receive Google Play services updates, simply increase the minSdkVersion value in your app’s adle to at least 14. This is the recommended course of action. Target API level 14 as the minimum supported API level. In order to use Google Play services 10.2.0 and later, you can choose one of the following options: 1. Unfortunately, the stated suggestion will not help you successfully run your app on older devices. > Manifest merger failed : uses -sdk :minSdkVersion 9 cannot be smaller than version 14 declared in library Suggestion : use tools :overrideLibrary = ":play_services" to force usage However, if your app supports lower than API level 14, you will encounter a problem at build time with an error that looks like this: Error :Execution failed for task ':app:processDebugManifest'. When you choose to upgrade to the future version 10.2.0, and if your app minimally supports API level 14 or greater (typically specified as “minSdkVersion” in your adle), you will not encounter any versioning problems. It will continue to work with Gingerbread devices as it has in the past. You may use version 10.0.0 of Google Play services and Firebase as you are currently. What this means for your Android app that uses Google Play services or Firebase: By making this change, we will be able to provide a more robust collection of tools for Android developers with greater speed. This helps them build better apps that make use of the newer capabilities of the Android platform. Many Android developers have already discontinued support for Gingerbread in their apps. The Gingerbread platform is almost six years old. Why are we discontinuing support for Gingerbread and Honeycomb in Google Play services? The next scheduled release of these libraries, version 10.2.0, will increase the minimum supported API level from 9 to 14 (Android 4.0.1, Ice Cream Sandwich). Version 10.0.0 of the Google Play services client libraries, as well as the Firebase client libraries for Android, will be the last version of these libraries that support Android API level 9 (Android 2.3, Gingerbread). Originally posted on Android Developer Blog
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |