skip to Main Content

I use react-native 0.69.7, got this email:

com.google.android.play:core has added this note for core:1.9.0:

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

here is my package.json file:
package.json

I tried following the doc but it doesn’t work, is there any solution for react-native ?

4

Answers


  1. Did you fix this issue ?

    Thanks

    Login or Signup to reply.
  2. Just wanted to know if my understanding about this issue is right. Will any third party used in the app be using any Android 14 incompatible play service dependency? (Sorry to add this as answer. It’s because i dont have enough stack overflow reputation points in order to add a comment)

    Login or Signup to reply.
  3. The issue should be at build.gradle app level, probably you miss the migration to Play Core:

    https://developer.android.com/guide/playcore?hl=it#groovy

    For example I had the same issue with an Android Native application, I had the play dependencies like the following:

    implementation 'com.google.android.play:core:1.10.3'
    

    Which I replace with:

    implementation 'com.google.android.play:asset-delivery:2.2.2'
    implementation 'com.google.android.play:app-update:2.1.0'
    implementation 'com.google.android.gms:play-services-tasks:18.2.0'
    
    Login or Signup to reply.
  4. In our case, com.google.android.play:core was a transitive dependency. This means it was included indirectly through another library. To resolve this, we needed to identify which dependency was using it and update that dependency to the latest version.

    Steps to Identify the Dependency Using com.google.android.play:core:

    1. Navigate to the Android Folder:

      • Open a terminal and navigate to the android directory of your React Native project:

        cd android
        
    2. Run the Gradle Dependencies Command:

      • Execute the following command to generate a list of all dependencies and their transitive dependencies:

        ./gradlew app:dependencies > dependencies.txt
        
    3. Search for com.google.android.play:core:

      • Open the dependencies.txt file and search for com.google.android.play:core to find which library is including it.

    Example:

    In our project, we found that the library sp-react-native-in-app-updates was using com.google.android.play:core as a transitive dependency:

    --- project :sp-react-native-in-app-updates
         +--- com.facebook.react:react-native:+ -> 0.68.2 (*)
         --- com.google.android.play:core:1.9.1
    

    After identifying the dependency, we updated sp-react-native-in-app-updates to its latest version to ensure it uses the latest version of com.google.android.play:core.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search