简体   繁体   中英

Android Studio 3.1.4 implementation 'com.android.support:appcompat-v7:28.0.0-rc01' error

is there any fix to this error? implementation 'com.android.support:appcompat-v7:28.0.0-rc01'

Error Log:

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0-rc01, 26.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0-rc01 and com.android.support:support-media-compat:26.1.0 less... (Ctrl+F1) There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion).

what does it need me to do?

Here is my gradle file:

implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

    compile 'com.google.firebase:firebase-core:16.0.0'

Just follow the instructions and the error will be gone. Add the following dependencies to the gradle file because you must have to use the same version of library in your project for smooth operation of app.

implementation 'com.android.support:animated-vector-drawable:28.0.0-rc01'
implementation 'com.android.support:support-media-compat:28.0.0-rc01'

Actually android studio provides all the information (errors and warning) to ease the development.

And also a suggestion change the compile to implementation in the firebase-core 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