Skip to content

Play Core Maven Dependency Update for Android 14

Problem Statement

Google Play Console displays a critical warning when your app targets Android 14 (targetSdkVersion 34) but uses an outdated Play Core dependency:

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

This occurs due to Android 14's backwards-incompatible change involving broadcast receivers. Failure to resolve this by August 31 (Google Play's deadline) will prevent app updates and may cause crashes on Android 14 devices.

1. Update Play Core Dependencies (Modern Approach)

The legacy com.google.android.play:core library is deprecated. Replace it with modular libraries corresponding to specific features:

Step 1: Update build.gradle.kts (or build.gradle):

kotlin
// Remove outdated dependency
// implementation("com.google.android.play:core:1.10.3") 

// Add needed modules (choose relevant ones)
implementation("com.google.android.play:app-update:2.1.0")       // In-App Updates
implementation("com.google.android.play:review:2.0.1")           // In-App Reviews
implementation("com.google.android.play:asset-delivery:2.1.0")   // Asset Delivery
implementation("com.google.android.play:feature-delivery:2.1.0") // Feature Delivery

// For Kotlin users, add KTX equivalents
implementation("com.google.android.play:app-update-ktx:2.1.0")

Step 2: Update task imports in Java/Kotlin files:

java
// Replace legacy Play Core imports
// import com.google.android.play.core.tasks.Task; 

// Use new GMS Tasks imports
import com.google.android.gms.tasks.Task;

2. Identify and Remove Outdated Dependencies

Third-party libraries using deprecated Play Core may trigger the warning. To locate them:

Via Android Studio:

  1. Go to File → Project Structure → Suggestions
  2. Select "Apps" under module filters
  3. Check for outdated dependencies in warnings

Via Terminal:

bash
cd android  # Navigate to project root
./gradlew app:dependencies > dependencies.txt

Search dependencies.txt for com.google.android.play:core to identify offending libraries.

Solutions:

  • Update problematic dependencies to newer versions
  • Remove unnecessary plugins (e.g., Cordova users: cordova plugin remove cordova-plugin-apprate)

3. Resolve Conflicts in Navigation Components

If using Jetpack Navigation, ensure androidx.navigation is updated to avoid conflicts:

gradle
// In build.gradle
implementation "androidx.navigation:navigation-fragment-ktx:2.8.0-rc02"
implementation "androidx.navigation:navigation-ui-ktx:2.8.0-rc02"

Verifying the Fix

  1. Rebuild your project
  2. Ensure no com.google.android.play:core artifacts remain in the APK
  3. Confirm warnings disappear in Project Structure → Suggestions

Heads Up

  • After migration, verify APIs from legacy Play Core (e.g., AppUpdateManager, ReviewManager) now use imports from the new modular libraries.
  • If migrating from Play Core Kotlin Extensions, use *-ktx dependencies instead.

Why This Change is Necessary

Android 14 introduced stricter security for broadcast receivers. The legacy Play Core library (last version: 1.10.3) lacks compatibility with these changes, resulting in instability. Google now provides optimized, per-feature libraries to address this.

References

Key Takeaways

  • Remove all references to com.google.android.play:core
  • Replace with modular dependencies based on required features
  • Check third-party libraries for hidden outdated dependencies
  • Meet the August 31 deadline to avoid publication blocks