alexC
alexC

Reputation: 273

Update your Play Core Maven dependency to an Android 14 compatible version

I have received this message from Google Play:

com.google.android.play:core:1.10.3 Google Play Core (com.google.android.play:core) has added this note for SDK version 1.10.3:

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

From September 25, 2024 00:00 (UTC) you won't be able to release new versions of your app containing this SDK version to production or open testing.

Here is my dependencies list used in project:

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    // facebook
    implementation('com.facebook.android:facebook-android-sdk:16.0.0') {
        exclude group: 'com.google.zxing'
    }
    // android base libraries
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'net.yslibrary.licenseadapter:licenseadapter:1.4.0'
    implementation 'com.github.PhilJay:MPAndroidChart:v2.2.5'
    implementation 'com.google.android.flexbox:flexbox:3.0.0'

    implementation 'com.squareup.picasso:picasso:2.71828'

    //image and file picker
    implementation 'com.kbeanie:multipicker:1.6.2@aar'

    // qr and bar code
    implementation 'com.journeyapps:zxing-android-embedded:4.2.0'
    implementation 'com.google.zxing:core:3.3.0' // to ensure min sdk < 24

    // preference manager
    implementation "androidx.preference:preference-ktx:1.1.1"
    // encrypted shared preferences
    implementation "androidx.security:security-crypto:1.1.0-alpha03"

    // work manager
    implementation "androidx.work:work-runtime-ktx:2.7.1"

    // permissions
    implementation 'androidx.activity:activity:1.6.0'
    implementation 'androidx.fragment:fragment:1.5.7'


    // ViewModel and LiveData
    implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
    implementation 'androidx.fragment:fragment-ktx:1.5.5'
    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'

    // constraint layout
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

//    // custom calendar
    implementation 'com.whiteelephant:monthandyearpicker:1.3.0'

    // room db
    implementation 'androidx.room:room-runtime:2.4.0-alpha03'

    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
    implementation 'androidx.lifecycle:lifecycle-livedata-core-ktx:2.5.1'
    // swipe to refresh
    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"

    testImplementation 'junit:junit:4.12'
//    annotationProcessor 'androidx.room:room-compiler:2.2.5'
    kapt "androidx.room:room-compiler:2.4.0-alpha03"

    // might be needed for desugaring, for screens like green steps, but might not, we'll see
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'

    // expandable library, used for expandable items in selector
    implementation 'com.github.cachapa:ExpandableLayout:2.9.2'

    //  custom calendar, used to disable certain dates
    implementation 'com.wdullaer:materialdatetimepicker:4.2.3'

    implementation 'com.qualtrics:digital:2.7.0'

    // android navigation
    implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
    implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'

    // instagram-like stories (just a pager with fancy timeline)
    implementation 'com.github.teresaholfeld:Stories:1.1.4'

    // google libs
    // firebase sdk
    googleImplementation 'com.google.firebase:firebase-core:18.0.3'
    // firebase cloud messaging -> fcm
    googleImplementation "com.google.firebase:firebase-iid:21.1.0"
    googleImplementation 'com.google.firebase:firebase-messaging:22.0.0'
    // Add the Firebase Crashlytics SDK.
    googleImplementation 'com.google.firebase:firebase-crashlytics:17.4.1'
    // Recommended: Add the Google Analytics SDK.
    googleImplementation 'com.google.firebase:firebase-analytics:18.0.3'

    // google signin
    googleImplementation 'com.google.android.gms:play-services-auth:19.0.0'
    // google fitness
    googleImplementation 'com.google.android.gms:play-services-fitness:20.0.0'
//    // google maps
    googleImplementation 'com.google.android.gms:play-services-maps:17.0.0'
    // google location
    googleImplementation 'com.google.android.gms:play-services-location:18.0.0'
    // google maps util
    googleImplementation 'com.google.maps.android:maps-utils-ktx:2.1.1'
//    googleImplementation 'com.google.maps.android:maps-ktx:2.1.1'
    googleImplementation 'com.huawei.hms:location:6.7.0.300'
    googleImplementation 'com.huawei.hms:maps:6.6.1.301'
//
//    // huawei libs
    huaweiImplementation 'com.huawei.agconnect:agconnect-core:1.6.0.300'
    huaweiImplementation 'com.huawei.hms:base:6.2.0.300'
    huaweiImplementation 'com.huawei.hms:hwid:6.12.0.300'
    huaweiImplementation 'com.huawei.hms:push:6.12.0.300'
    huaweiImplementation 'com.huawei.hms:hianalytics:6.7.0.300'
    huaweiImplementation 'com.huawei.agconnect:agconnect-crash:1.6.0.300'
    huaweiImplementation 'com.huawei.hms:location:6.7.0.300'
    huaweiImplementation 'com.huawei.hms:maps:6.11.0.304'
    huaweiImplementation 'me.tatiyanupanwong.supasin.android.libraries.huawei.maps:maps-utils:1.0.0-alpha02'

    implementation "com.github.skydoves:balloon:1.3.4"

    // jwt libs
    api 'io.jsonwebtoken:jjwt-api:0.11.2'
    runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.2'
    runtimeOnly('io.jsonwebtoken:jjwt-orgjson:0.11.2') {
        exclude group: 'org.json', module: 'json' //provided by Android natively
    }
    implementation 'com.github.ridebeeline:android-rx-gpx-writer:2.0.0'

    // well... the datakit
    implementation project(':datakit')
}

And also these:

dependencies {
    // kotlin
//    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    api 'androidx.core:core-ktx:1.8.0'

    // material components
    api 'com.google.android.material:material:1.6.1'

    api 'com.google.code.gson:gson:2.9.0'
    api 'io.reactivex:rxandroid:1.2.1'
    api 'io.reactivex:rxjava:1.3.8'
    // retrofit
    api 'com.squareup.retrofit2:retrofit:2.9.0'
    api 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
    api 'com.squareup.retrofit2:adapter-rxjava:2.9.0'
    api 'com.squareup.retrofit2:converter-gson:2.9.0'
    // okhttp
    api 'com.squareup.okhttp3:okhttp:4.9.3'
    api 'com.squareup.okhttp3:logging-interceptor:4.9.3'
    api 'com.squareup.okhttp3:okhttp-urlconnection:4.9.3'

    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}

As you can see I am not directly using play core library in my app. How can I determine which library I need to update or which already used library is using google play core?

Upvotes: 0

Views: 1274

Answers (1)

Jayant Kumar
Jayant Kumar

Reputation: 1038

Go to File -> Project Structure -> Click on Suggestions

enter image description here

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.

enter image description here

Upvotes: 0

Related Questions