Migration from the Play Core Library

Mayur Waghmare
3 min readJul 5, 2024

--

Recently, many developers received an email from the Play Console

Update your Play Core Maven dependency to an Android 14 compatible version! Your current Play Core library is incompatible with targetSdkVersion 34 (Android 14).

This might look afrading at first point. But don’t worry.

Let’s understand What is this all about.

Why Migrate?

Google has deprecated the Play Core Library and recommends migrating to newer libraries that offer more focused and robust functionalities.

The last version of Play Core Library was released back in 2022.

And from April 2022, The Google Play Core Java and Kotlin library have been split into multiple separate libraries:

  • Play Assets Delivery Library
  • Play Feature Delivery Library
  • Play In-App Reviews Library
  • Play In-App Updates Library

This was done to reduce the size libraries and for faster release cycles of the individual features.

Now the new versions have adopted Google Play Services’ Task API. And this is what the migration is all about.

Lets see how to migrate to these new libraries.

Note: If you are using muliple Play Features, you can simply import multiple libraries in your build.gradle file at once.

Step 1: Update any existing import statements of Task objects from

import com.google.android.play.core.tasks.*;

to

import com.google.android.gms.tasks.*;

Step 2: Remove any imports of the old Play Core libraries in your build.gradle file.

Remove the Play Core Depdendecy (if there)

implementation 'com.google.android.play:core-ktx:1.8.1'

Instead replace it with individual feature dependecies listed below:

For Play In-App-Updates library

implementation 'com.google.android.play:app-update:2.1.0'
//Add the dependency below if you are using Kotlin in your application
implementation 'com.google.android.play:app-update-ktx:2.1.0'

For Play In-App Review Library

implementation 'com.google.android.play:review:2.0.1'
//Add the dependency below if you are using Kotlin in your application
implementation 'com.google.android.play:review-ktx:2.0.1'

For Play Asset Delivery Library

implementation 'com.google.android.play:asset-delivery:2.2.2'
//Add the dependency below if you are using Kotlin in your application
implementation 'com.google.android.play:asset-delivery-ktx:2.2.2'

For Play Feature Delivery Library

implementation 'com.google.android.play:feature-delivery:2.1.0'
//Add the dependency below if you are using Kotlin in your application
implementation 'com.google.android.play:feature-delivery-ktx:2.1.0'

For Flutter Apps

If you are using the in_app_update package in your flutter project then you can use the version 4.1.0 or greater

Refer the changelog below

Thank you for taking the time to read this article. If you found the information valuable, please consider giving it a clap or sharing it with others who might benefit from it.

Any Suggestions are welcome. If you need any help or have questions for Code Contact US. You can follow us on LinkedIn for more updates 🔔

--

--

Mayur Waghmare

"Mobile App Developer specializing in Android, iOS, and Flutter. Passionate about crafting user-focused, efficient mobile solutions."