简体   繁体   中英

Support library dependencies in Android Q

In order to test my app for Android Q, I've installed Android Studio 3.5 (canary) and updated my build configuration as described here:

https://developer.android.com/preview/setup-sdk

But what do I do with the support library dependencies? The ones below are all red because:

This support library should not use a different version (28) than the compileSdkVersion (29)

dependencies {
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.android.support:gridlayout-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    testImplementation 'junit:junit:4.12') {
        transitive = true;
}

Do I just leave them as is until Google releases the new support library? I'm getting a build error but I'm not sure if it's related to this or not.

Support libraries will not be updated past 28. You need to migrate to androidx.

See support library documentation where it says:

Note: With the release of Android 9.0 (API level 28) there is a new version of the support library called AndroidX which is part of Jetpack. The AndroidX library contains the existing support library and also includes the latest Jetpack components.

You can continue to use the support library. Historical artifacts (those versioned 27 and earlier, and packaged as android.support.*) will remain available on Google Maven. However, all new library development will occur in the AndroidX library.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM