'com.android.support:appcompat-v7:27.1.1' in red

0

Why does this appear in red?

implementation 'com.android.support:appcompat-v7:27.1.1'

It says this in the warning:

  

ll com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.1.1, 26.1.0. Examples include com.android.support:animated-vector-drawable:27.1.1 and com.android.support:customtabs: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).

Here my gradle

apply plugin: 'com.android.application'



android {
compileSdkVersion 27
buildToolsVersion '28.0.3'
defaultConfig {
    applicationId "doctorbateria.masterclean.speed.booster"
    minSdkVersion 15
    targetSdkVersion 27
    versionCode 1
    versionName "2.0"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'),
                'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}



}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:27.1.1'

implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

// Dagger 2
implementation "com.google.dagger:dagger-android-support:2.11"
implementation "com.google.dagger:dagger:2.11"
annotationProcessor "com.google.dagger:dagger-compiler:2.11"



implementation 'io.reactivex:rxandroid:1.2.0'

implementation 'io.reactivex:rxjava:1.1.4'

implementation 'org.greenrobot:eventbus:3.0.0'

implementation 'com.facebook.stetho:stetho:1.3.1'

implementation 'com.facebook.stetho:stetho-js-rhino:1.3.1'

implementation 'com.github.pluscubed:recycler-fast-scroll:0.3.1@aar'
implementation 'me.zhanghai.android.materialprogressbar:library:1.4.2'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.github.john990:WaveView:16a10c1f9b'
implementation 'com.github.lecho:hellocharts-library:1.5.8@aar'
implementation 'com.balysv:material-ripple:1.0.2'
implementation 'com.mikhaellopez:circularfillableloaders:1.2.0'
implementation 'com.readystatesoftware.systembartint:systembartint:1.0.3'


implementation 'com.mikepenz:actionitembadge:3.2.5@aar'

implementation 'com.mikepenz:iconics-core:2.5.11@aar'
implementation 'com.mikepenz:fontawesome-typeface:4.4.0.1@aar'
implementation 'com.jenzz:materialpreference:1.3'
implementation 'com.jaredrummler:android-processes:1.0.9'
implementation project(':orm-library')
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-ads:17.1.1'



}
    
asked by pauuu 05.12.2018 в 23:50
source

2 answers

0

In my opinion it is a problem of the versions, you must define a version similar to the one defined in targetSdkVersion or, in particular, a version lower than your targetSdkVersion as indicated by the warning you show. I share a similar problem that was already solved: compile error 'com.android.support:appcompat-v7:25.3.0' .

    
answered by 06.12.2018 в 00:19
0

The error indicates:

  

The com.android.support libraries should use exactly the same   version specification (mixing versions can cause crashes   at run time).

In fact, you can see it directly in the dependencies, since some will be displayed in a red color.

Change the same specification according to your version

To do this place the mouse pointer over each dependency and type

Alt + Enter

will open a contextual menu which will suggest the version to be replaced according to your configuration.

It is important that you know that even if you replace with the last version appropriate to your configuration, it may be that the red indicator continues to be displayed.

To avoid this, add above the dependency declaration:

//noinspection GradleCompatible

In this way the red indicator will definitely not be displayed:

    
answered by 06.12.2018 в 01:43