Reputation: 3606
Received a warning in the Play Console saying the following
Update your Play Core Maven dependency to an Android 14 compatible version! Your current Play Core library is incompatible with targetSdkVersion 34 (Android 14), which introduces a backwards-incompatible change to broadcast receivers to improve user security. As a reminder, from August 31, Google Play requires all new app releases to target Android 14. Update to the latest Play Core library version dependency to avoid app crashes
I would like to know, what can I possibly do to solve this problem?
My app is a complete native app, using Java/Kotlin and XML/Jetpack Compose
Upvotes: 16
Views: 26838
Reputation: 1
I had the same problem, and my solution was to remove the plugin that was using com.google.android.play:core, for my app the plugin I had to remove cordova-plugin-apprate with this command: cordova plugin remove cordova-plugin-apprate
Upvotes: 0
Reputation: 1
i also got this problem:- Update your Play Core Maven dependency to an Android 14 compatible version! Your current Play Core library is incompatible with targetSdkVersion 34 (Android 14), which introduces a backwards-incompatible change to broadcast receivers to improve user security. As a reminder, from August 31, Google Play requires all new app releases to target Android 14. Update to the latest Play Core library version dependency to avoid app crashes: https://developer.android.com/guide/playcore#playcore-migration
Solution:- Go To Android Studio. File->ProjectStructure. Click Suggestions. There are two options on right side: All Modules AND Apps. Select Apps. Top Of the Window Shows Google play core 1.10.3 Click This . List of dependencies Showned. Check 1.10.3 version dependency and if its here Click the dependency and then click Minus(-) Option and then build your project your problem is solved. Hope It Helps
Upvotes: 0
Reputation: 186
If you use navigation libraries: Go to gradle - change your nav library version from 2.7.7 to 2.8.0-beta06. Go to the file -> project structure -> suggestions - warning magically gone.
So this warning is completely up to Google – or have this warning or use the beta version of the library.
Upvotes: 3
Reputation: 1038
Go to File -> Project Structure -> Click on Suggestions
This error message will shown , click on View Usage
Here will show all the dependencies that are dependent on the com.google.android.play:feature-delivery
. Simply update all the dependencies.
Upvotes: 0
Reputation: 161
Step 1 (Updating dependencies)
Open the build.gradle (Module: app) file, find the library implementation below and remove it.
implementation 'com.google.android.play:core:1.10.3'
Add or change it with the 2 new libraries implementation below and Sync now.
implementation 'com.google.android.play:review:2.0.1'
implementation 'com.google.android.play:app-update:2.1.0'
Step 2 (Updating MainActivity.java)
Open the MainActivity.java file, find the following code below, for quick search, use Ctrl + F.
import com.google.android.play.core.tasks.Task;
Replace it with the code below, to make it faster, you can use Ctrl + R to replace the code with a new one:
import com.google.android.gms.tasks.Task;
Upvotes: 16
Reputation: 231
Problem Statement:
The Play Core Java and Kotlin Library has been partitioned into multiple per-feature Android libraries. That's why google shows warning or sdk issue messages into console account or throws error into terminal.
Solution: Remove any imports of the old Play Core libraries in your build.gradle file.
Scenario:
In my case i was using this "In-App-Update" (https://github.com/prongbang/inapp-update) old library which includes
dependencies {
api 'com.google.android.play:core-ktx:1.8.1'
}
Later i'd to remove that library and added these libraries, here's the final look of my apps build.gradle.kts file.
dependencies {
//implementation("com.google.android.play:core:1.10.3")
//implementation("com.github.prongbang:inapp-update:1.0.1")
// This dependency is downloaded from the Google’s Maven repository.
// Make sure you also include that repository in your project's build.gradle file.
implementation("com.google.android.play:app-update:2.1.0")
// For Kotlin users, also import the Kotlin extensions library for Play In-App Update:
implementation("com.google.android.play:app-update-ktx:2.1.0")
}
And my settings.gradle.kts file look like this:
pluginManagement {
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") }
gradlePluginPortal()
}
}
Happy conding :)
Upvotes: 2
Reputation: 3606
First and foremost, it's important to see that they've included a Migration link in the warning. So we need to migrate the Tasks
class as per that
Later, we can split the monolithic play-core
SDK into the required dependencies, as per the app requirement. The alternative SDKs can be found here
In my case, had to get the In-App Review and In-App updates SDK, seperately
EDIT:
For hybrid apps, we can go the android
folder
cd android
And run the following command to check all the dependencies listed in the app, and check which one has the com.google.android.play:core
dependency, by exporting all the dependencies to a text file dependencies.txt
./gradlew app:dependencies > dependencies.txt
Once you figure out, which of your dependencies uses the play core library, you can actually update it
Upvotes: 21